aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/email/default/_email_report_list.txt2
-rw-r--r--templates/web/base/admin/bodies/body.html2
-rw-r--r--templates/web/base/admin/config_page.html7
-rw-r--r--templates/web/base/admin/reports/edit.html2
-rw-r--r--templates/web/base/admin/responsepriorities/edit.html12
-rw-r--r--templates/web/base/admin/roles/form.html8
-rw-r--r--templates/web/base/admin/triage/_list-filters.html2
-rw-r--r--templates/web/base/admin/triage/index.html2
-rw-r--r--templates/web/base/admin/users/log.html12
-rw-r--r--templates/web/base/alert/_list.html2
-rw-r--r--templates/web/base/around/_postcode_submit_button.html2
-rwxr-xr-xtemplates/web/base/around/display_location.html4
-rwxr-xr-xtemplates/web/base/dashboard/heatmap.html2
-rwxr-xr-xtemplates/web/base/errors/generic.html2
-rw-r--r--templates/web/base/header.html8
-rw-r--r--templates/web/base/header/css.html2
-rw-r--r--templates/web/base/header/title.html2
-rw-r--r--templates/web/base/header_opengraph.html2
-rw-r--r--templates/web/base/main_nav.html6
-rw-r--r--templates/web/base/maps/google-ol.html2
-rw-r--r--templates/web/base/maps/noscript_map.html8
-rw-r--r--templates/web/base/maps/noscript_map_wmts.html2
-rw-r--r--templates/web/base/maps/openlayers.html9
-rw-r--r--templates/web/base/maps/wmts_config.html6
-rw-r--r--templates/web/base/my/my.html2
-rw-r--r--templates/web/base/my/planned.html2
-rw-r--r--templates/web/base/pagination.html2
-rw-r--r--templates/web/base/questionnaire/index.html6
-rw-r--r--templates/web/base/report/_item.html4
-rw-r--r--templates/web/base/report/_main.html2
-rw-r--r--templates/web/base/report/display.html6
-rw-r--r--templates/web/base/report/new/category_extras.html2
-rw-r--r--templates/web/base/report/new/category_extras_fields.html2
-rw-r--r--templates/web/base/report/new/category_wrapper.html2
-rw-r--r--templates/web/base/report/new/councils_text_all.html4
-rw-r--r--templates/web/base/report/new/fill_in_details.html2
-rw-r--r--templates/web/base/report/new/fill_in_details_form.html2
-rw-r--r--templates/web/base/report/new/login_success_form.html2
-rw-r--r--templates/web/base/report/new/oauth_email_form.html2
-rw-r--r--templates/web/base/reports/_list-filters.html2
-rwxr-xr-xtemplates/web/base/reports/body.html2
-rwxr-xr-xtemplates/web/base/reports/index.html2
-rw-r--r--templates/web/fiksgatami/header.html2
-rw-r--r--templates/web/fixmystreet.com/header/css.html2
-rw-r--r--templates/web/hart/header.html2
-rw-r--r--templates/web/oxfordshire/header.html2
-rw-r--r--templates/web/oxfordshire/main_nav.html4
-rw-r--r--templates/web/stevenage/header.html2
-rw-r--r--templates/web/zurich/admin/bodies/body.html2
-rw-r--r--templates/web/zurich/admin/report_edit-sdm.html2
-rw-r--r--templates/web/zurich/admin/reports/edit.html2
-rw-r--r--templates/web/zurich/header.html2
-rw-r--r--templates/web/zurich/maps/noscript_map.html10
-rw-r--r--templates/web/zurich/maps/zurich.html2
-rw-r--r--templates/web/zurich/report/new/fill_in_details_form.html2
-rwxr-xr-xtemplates/web/zurich/reports/index.html2
56 files changed, 102 insertions, 92 deletions
diff --git a/templates/email/default/_email_report_list.txt b/templates/email/default/_email_report_list.txt
index 3128e2f06..fed75a163 100644
--- a/templates/email/default/_email_report_list.txt
+++ b/templates/email/default/_email_report_list.txt
@@ -1,4 +1,4 @@
-[% FOR report IN data -%]
+[% FOR report IN data %]
[% cobrand.base_url_for_report(report) %]/report/[% report.id %] - [% report.title %]
[% report.nearest ~%]
diff --git a/templates/web/base/admin/bodies/body.html b/templates/web/base/admin/bodies/body.html
index 8f298676e..4ce97d935 100644
--- a/templates/web/base/admin/bodies/body.html
+++ b/templates/web/base/admin/bodies/body.html
@@ -129,7 +129,7 @@
[% IF errors %]
<div class="fms-admin-warning">
- [% errors.values.join('<br>') %]
+ [% FOR error IN errors.values %][% error %][% IF NOT loop.last %]<br>[% END %][% END %]
</div>
[% INCLUDE 'admin/bodies/contact-form.html' translations=contact_translations %]
[% ELSE %]
diff --git a/templates/web/base/admin/config_page.html b/templates/web/base/admin/config_page.html
index 8e8d562ff..15d232f4e 100644
--- a/templates/web/base/admin/config_page.html
+++ b/templates/web/base/admin/config_page.html
@@ -51,7 +51,12 @@ running version <strong>[% git_version || 'unknown' %]</strong>.
[% INCLUDE just_value value="ALLOWED_COBRANDS" conf = allowed_conf %]
<tr>
<td>Web templates</td>
-<td colspan=2>[% c.cobrand.path_to_web_templates.join('<br>') %]</td>
+<td colspan=2>
+ [% FOR path IN c.cobrand.path_to_web_templates %]
+ [% path %]
+ [% IF NOT loop.last %]<br>[% END %]
+ [% END %]
+</td>
</tr>
[% INCLUDE with_cobrand value="MAP_TYPE" cob=c.cobrand.map_type %]
[% INCLUDE with_cobrand value="EXAMPLE_PLACES"
diff --git a/templates/web/base/admin/reports/edit.html b/templates/web/base/admin/reports/edit.html
index b4af705a9..4f9b58887 100644
--- a/templates/web/base/admin/reports/edit.html
+++ b/templates/web/base/admin/reports/edit.html
@@ -7,7 +7,7 @@
PROCESS 'admin/report_blocks.html'
-%]
-[% map_html %]
+[% map_html | safe %]
</div>
<div id="map_sidebar">
diff --git a/templates/web/base/admin/responsepriorities/edit.html b/templates/web/base/admin/responsepriorities/edit.html
index 90317b375..b9074999f 100644
--- a/templates/web/base/admin/responsepriorities/edit.html
+++ b/templates/web/base/admin/responsepriorities/edit.html
@@ -4,22 +4,22 @@
<form method="post" accept-charset="utf-8" class="validate">
- [% form.field('name').render %]
- [% form.field('description').render %]
+ [% form.field('name').render | safe %]
+ [% form.field('description').render | safe %]
<div class="admin-hint">
<p>
[% loc('If this priority is passed to an external service (e.g. Exor/Confirm) enter the priority code to use with that service here.') %]
</p>
</div>
- [% form.field('external_id').render %]
+ [% form.field('external_id').render | safe %]
<div class="admin-hint">
<p>
[% loc('Select if this is the default priority') %]
</p>
</div>
- [% form.field('is_default').render %]
+ [% form.field('is_default').render | safe %]
<fieldset>
<legend>
@@ -31,10 +31,10 @@
[% loc('Categories:') %]
</legend>
[%# TODO Select all/none %]
- [% form.field('contacts').render %]
+ [% form.field('contacts').render | safe %]
</fieldset>
- [% form.field('deleted').render %]
+ [% form.field('deleted').render | safe %]
<p>
<input type="hidden" name="token" value="[% csrf_token %]" >
diff --git a/templates/web/base/admin/roles/form.html b/templates/web/base/admin/roles/form.html
index cb50689a6..1801746af 100644
--- a/templates/web/base/admin/roles/form.html
+++ b/templates/web/base/admin/roles/form.html
@@ -4,18 +4,18 @@
<div class="admin-hint">
<p>[% loc("The role's <strong>name</strong> is used to refer to this group of permissions elsewhere in the admin.") %]</p>
</div>
- [% form.field('name').render %]
+ [% form.field('name').render | safe %]
[% IF form.field('body').is_active %]
- [% form.field('body').render %]
+ [% form.field('body').render | safe %]
[% END %]
<div class="admin-hint">
<p>[% loc("Users with this role can perform the following actions within their assigned body or area.") %]</p>
</div>
- [% form.field('permissions').render %]
+ [% form.field('permissions').render | safe %]
- [% form.field('submit').render %]
+ [% form.field('submit').render | safe %]
<p>
<input class="btn" type="submit" name="submit" value="[% loc('Save changes') %]">
diff --git a/templates/web/base/admin/triage/_list-filters.html b/templates/web/base/admin/triage/_list-filters.html
index f6bedcb80..dd3e17875 100644
--- a/templates/web/base/admin/triage/_list-filters.html
+++ b/templates/web/base/admin/triage/_list-filters.html
@@ -20,7 +20,7 @@
[% END %]
<p class="report-list-filters">
- [% tprintf(loc('<label for="statuses">Show</label> %s reports <label for="filter_categories">about</label> %s', "The first %s is a dropdown of all/fixed/etc, the second is a dropdown of categories"), 'untriaged', select_category) %]
+ [% tprintf(loc('<label for="statuses">Show</label> %s reports <label for="filter_categories">about</label> %s', "The first %s is a dropdown of all/fixed/etc, the second is a dropdown of categories"), 'untriaged', mark_safe(select_category)) %]
<input type="submit" name="filter_update" value="[% loc('Go') %]">
</p>
diff --git a/templates/web/base/admin/triage/index.html b/templates/web/base/admin/triage/index.html
index f00bbc1fa..8b6880c24 100644
--- a/templates/web/base/admin/triage/index.html
+++ b/templates/web/base/admin/triage/index.html
@@ -14,7 +14,7 @@
rss = [ tprintf(loc('Problems within %s, %s', "First %s is the body name, second %s the site name"), name, site_name), rss_url ]
%]
-[% map_html %]
+[% map_html | safe %]
</div>
<div id="map_sidebar">
diff --git a/templates/web/base/admin/users/log.html b/templates/web/base/admin/users/log.html
index a596d040c..4b426e0ba 100644
--- a/templates/web/base/admin/users/log.html
+++ b/templates/web/base/admin/users/log.html
@@ -44,21 +44,21 @@ action_map = {
[%~ SET report_link = "<a href='" _ report_url _ "'>" _ item.obj.id _ "</a>" %]
[%- SWITCH item.type -%]
[%~ CASE 'problem' %]
- [%- tprintf(loc('Problem %s created'), report_link) %], ‘[% item.obj.title | html %]’
+ [%- tprintf(loc('Problem %s created'), mark_safe(report_link)) %], ‘[% item.obj.title | html %]’
[%~ CASE 'problemContributedBy' %]
- [%- tprintf(loc('Problem %s created on behalf of %s'), report_link, item.obj.name) %], ‘[% item.obj.title | html %]’
+ [%- tprintf(loc('Problem %s created on behalf of %s'), mark_safe(report_link), item.obj.name) %], ‘[% item.obj.title | html %]’
[%~ CASE 'update' %]
- [% tprintf(loc("Update %s created for problem %d"), report_link, item.obj.problem_id) %]
+ [% tprintf(loc("Update %s created for problem %d"), mark_safe(report_link), item.obj.problem_id) %]
[% item.obj.text | add_links | markup(item.obj.user) | html_para %]
[%~ CASE 'shortlistAdded' %]
- [%- tprintf(loc('Problem %s added to shortlist'), report_link) %]
+ [%- tprintf(loc('Problem %s added to shortlist'), mark_safe(report_link)) %]
[%~ CASE 'shortlistRemoved' %]
- [%- tprintf(loc('Problem %s removed from shortlist'), report_link) %]
+ [%- tprintf(loc('Problem %s removed from shortlist'), mark_safe(report_link)) %]
[%~ CASE 'log' %]
[%~ SET object_summary = item.log.object_summary %]
[% IF object_summary %]
[%~ SET link = tprintf('<a href="%s">%s</a>', item.log.link, object_summary) %]
- [%- tprintf('%s %s %s', action_map.${item.log.action}, item.log.actual_object_type, link) %]
+ [%- tprintf('%s %s %s', action_map.${item.log.action}, item.log.actual_object_type, mark_safe(link)) %]
[% ' – ' _ item.log.reason IF item.log.reason %]
[% ELSE %]
[%- tprintf('%s %s %s', action_map.${item.log.action}, item.log.actual_object_type, item.log.object_id) %]
diff --git a/templates/web/base/alert/_list.html b/templates/web/base/alert/_list.html
index 3dbd6b8d2..782989a5c 100644
--- a/templates/web/base/alert/_list.html
+++ b/templates/web/base/alert/_list.html
@@ -26,7 +26,7 @@
<p id="rss_local_alt">
[% SET distance_options = '<a href="' _ rss_feed_2k _ ' ">2km</a> / <a href="' _ rss_feed_5k _ ' ">5km</a> / <a href="' _ rss_feed_10k _ '">10km</a> / <a href="' _ rss_feed_20k _ '">20km</a>' %]
- [% tprintf(loc('(we also have RSS feeds for problems within %s)', "%s is a list of distance links, e.g. [2km] / [5km] / [10km] / [20km]"), distance_options) %]
+ [% tprintf(loc('(we also have RSS feeds for problems within %s)', "%s is a list of distance links, e.g. [2km] / [5km] / [10km] / [20km]"), mark_safe(distance_options)) %]
</p>
[% FOREACH option IN options %]
diff --git a/templates/web/base/around/_postcode_submit_button.html b/templates/web/base/around/_postcode_submit_button.html
index faf4ea628..749a3a950 100644
--- a/templates/web/base/around/_postcode_submit_button.html
+++ b/templates/web/base/around/_postcode_submit_button.html
@@ -1,4 +1,4 @@
-<input type="submit" [% attr %] value="[%
+<input type="submit" [% attr | safe %] value="[%
IF c.cobrand.moniker == 'cheshireeast';
'Search for location';
ELSE;
diff --git a/templates/web/base/around/display_location.html b/templates/web/base/around/display_location.html
index 2d36161be..d0592749e 100755
--- a/templates/web/base/around/display_location.html
+++ b/templates/web/base/around/display_location.html
@@ -57,7 +57,7 @@
[% END %]
[% END %]
- [% map_html %]
+ [% map_html | safe %]
[% IF c.req.params.no_pins %]
<a class="big-hide-pins-link" rel='nofollow' href="[% c.uri_with( { no_pins => 0 } ) %]">[% loc('Show pins') %]</a>
@@ -66,7 +66,7 @@
[% END %]
<p class="sub-map-links" id='sub_map_links'>
- [% map_sub_links %]
+ [% map_sub_links | safe %]
[% IF c.req.params.no_pins %]
<a id='hide_pins_link' rel='nofollow' href="[% c.uri_with( { no_pins => 0 } ) %]">[% loc('Show pins') %]</a>
[% ELSE %]
diff --git a/templates/web/base/dashboard/heatmap.html b/templates/web/base/dashboard/heatmap.html
index ba5c10c17..ca4d02926 100755
--- a/templates/web/base/dashboard/heatmap.html
+++ b/templates/web/base/dashboard/heatmap.html
@@ -9,7 +9,7 @@
title = tprintf(loc('%s - Summary reports'), body.name)
%]
-[% map_html %]
+[% map_html | safe %]
</div>
<div id="map_sidebar">
diff --git a/templates/web/base/errors/generic.html b/templates/web/base/errors/generic.html
index e5c2ca0c1..6d4acccf8 100755
--- a/templates/web/base/errors/generic.html
+++ b/templates/web/base/errors/generic.html
@@ -7,7 +7,7 @@
<div class="confirmation-header confirmation-header--failure">
<h1>[% title %]</h1>
- <p>[% message %]</p>
+ <p>[% message | safe %]</p>
</div>
[% INCLUDE 'footer.html' %]
diff --git a/templates/web/base/header.html b/templates/web/base/header.html
index 7f423ff9e..7ef1265de 100644
--- a/templates/web/base/header.html
+++ b/templates/web/base/header.html
@@ -4,9 +4,9 @@
# SET html_att = html_att _ ' dir="rtl"';
-%]
<!doctype html>
-<!--[if IE 8]> <html class="no-js ie8"[% html_att %]><![endif]-->
-<!--[if IE 9]> <html class="no-js ie9"[% html_att %]><![endif]-->
-<!--[if gt IE 9]><!--><html class="no-js"[% html_att %]
+<!--[if IE 8]> <html class="no-js ie8"[% html_att | safe %]><![endif]-->
+<!--[if IE 9]> <html class="no-js ie9"[% html_att | safe %]><![endif]-->
+<!--[if gt IE 9]><!--><html class="no-js"[% html_att | safe %]
[% IF appcache ~%]
manifest="/offline/appcache.manifest"
[%~ END %]><!--<![endif]-->
@@ -32,7 +32,7 @@
<div class="table-cell">
[% INCLUDE 'header_site.html' %]
- [% pre_container_extra %]
+ [% pre_container_extra | safe %]
<div class="container">
<div class="content[% " $mainclass" | html IF mainclass %]" role="main">
diff --git a/templates/web/base/header/css.html b/templates/web/base/header/css.html
index 219369465..a5d2580e8 100644
--- a/templates/web/base/header/css.html
+++ b/templates/web/base/header/css.html
@@ -8,4 +8,4 @@
<![endif]-->
<link rel="stylesheet" href="[% version('/vendor/OpenLayers/theme/default/style.css') %]">
-[% extra_css %]
+[% extra_css | safe %]
diff --git a/templates/web/base/header/title.html b/templates/web/base/header/title.html
index 835c87790..f3ff5119c 100644
--- a/templates/web/base/header/title.html
+++ b/templates/web/base/header/title.html
@@ -1,4 +1,4 @@
<title>
- [% "$title :: " | html IF title %]
+ [% tprintf('%s :: ', title) IF title %]
[% site_name -%]
</title>
diff --git a/templates/web/base/header_opengraph.html b/templates/web/base/header_opengraph.html
index 8cda4c717..6d2b55fed 100644
--- a/templates/web/base/header_opengraph.html
+++ b/templates/web/base/header_opengraph.html
@@ -1,5 +1,5 @@
<meta property="og:url" content="[% c.cobrand.base_url %][% c.req.uri.path %]">
- <meta property="og:title" content="[% title || site_name | html %]">
+ <meta property="og:title" content="[% title || site_name %]">
<meta property="og:site_name" content="[% site_name %]">
[% IF c.req.uri.path == '/' %]<meta property="og:description" content="[% loc('Report, view, and discuss local street-related problems.') %]">[% END %]
<meta property="og:type" content="website">
diff --git a/templates/web/base/main_nav.html b/templates/web/base/main_nav.html
index 189630902..1c253fd01 100644
--- a/templates/web/base/main_nav.html
+++ b/templates/web/base/main_nav.html
@@ -4,11 +4,11 @@
SET ul_class="nav-menu nav-menu--main" UNLESS ul_class.defined;
%]
[% BLOCK navitem ~%]
- <li [% liattrs %]>
+ <li [% liattrs | safe %]>
[%~ IF c.req.uri.path == uri AND NOT always_url ~%]
- <span [% attrs %]>[% label %]</span>
+ <span [% attrs | safe %]>[% label %]</span>
[%~ ELSE ~%]
- <a href="[% uri %][% suffix IF suffix %]" [% attrs %]>[% label %]</a>
+ <a href="[% uri %][% suffix IF suffix %]" [% attrs | safe %]>[% label %]</a>
[%~ END ~%]
</li>
[%~ END %]
diff --git a/templates/web/base/maps/google-ol.html b/templates/web/base/maps/google-ol.html
index 8e0690f9d..47c940129 100644
--- a/templates/web/base/maps/google-ol.html
+++ b/templates/web/base/maps/google-ol.html
@@ -6,7 +6,7 @@
[% INCLUDE maps/openlayers.html %]
[% UNLESS around_page %]
<p class="sub-map-links" id="sub_map_links">
- [% map_sub_links %]
+ [% map_sub_links | safe %]
</p>
[% END %]
[% END %]
diff --git a/templates/web/base/maps/noscript_map.html b/templates/web/base/maps/noscript_map.html
index 8418c4eb8..0b7431148 100644
--- a/templates/web/base/maps/noscript_map.html
+++ b/templates/web/base/maps/noscript_map.html
@@ -1,23 +1,23 @@
[% SET start = c.config.ADMIN_BASE_URL IF admin -%]
<div class="noscript">
<div id="[% nsm_prefix %]drag">
- <[% map.img_type %]
+ <[% map.img_type | safe %]
alt="NW map tile" id="[% nsm_prefix %]t2.2"
name="tile_[% map.x_tile - 1 %].[% map.y_tile - 1 %]"
src="[% map.tiles.0 %]"
style="top:0; left:0;">
- <[% map.img_type %]
+ <[% map.img_type | safe %]
alt="NE map tile" id="[% nsm_prefix %]t2.3"
name="tile_[% map.x_tile %].[% map.y_tile - 1 %]"
src="[% map.tiles.1 %]"
style="top:0px; left:256px;">
<br>
- <[% map.img_type %]
+ <[% map.img_type | safe %]
alt="SW map tile" id="[% nsm_prefix %]t3.2"
name="tile_[% map.x_tile - 1 %].[% map.y_tile %]"
src="[% map.tiles.2 %]"
style="top:256px; left:0;">
- <[% map.img_type %]
+ <[% map.img_type | safe %]
alt="SE map tile" id="[% nsm_prefix %]t3.3"
name="tile_[% map.x_tile %].[% map.y_tile %]"
src="[% map.tiles.3 %]"
diff --git a/templates/web/base/maps/noscript_map_wmts.html b/templates/web/base/maps/noscript_map_wmts.html
index 987aa76a6..2b1c5e73c 100644
--- a/templates/web/base/maps/noscript_map_wmts.html
+++ b/templates/web/base/maps/noscript_map_wmts.html
@@ -5,7 +5,7 @@
[%- FOR tile IN row -%]
[%- top_px = tile.row_offset * map.tile_size -%]
[%- left_px = tile.col_offset * map.tile_size %]
- <[% map.img_type %]
+ <[% map.img_type | safe %]
class="square-map__tile"
alt="[% tile.alt %]"
id="[% nsm_prefix %]t[% tile.dotted_id %]"
diff --git a/templates/web/base/maps/openlayers.html b/templates/web/base/maps/openlayers.html
index 02f6cb131..5002d4243 100644
--- a/templates/web/base/maps/openlayers.html
+++ b/templates/web/base/maps/openlayers.html
@@ -33,10 +33,13 @@
<div id="map_box" aria-hidden="true">
[% pre_map %]
<div id="map">
- [% DEFAULT noscript_map_template = 'maps/noscript_map.html' %]
- [% INCLUDE $noscript_map_template js = 1 %]
+ [% IF noscript_map_template == 'maps/noscript_map_wmts.html' %]
+ [% INCLUDE 'maps/noscript_map_wmts.html' js = 1 %]
+ [% ELSE %]
+ [% INCLUDE 'maps/noscript_map.html' js = 1 %]
+ [% END %]
</div>
[% IF map.copyright %]
- <div class="olControlAttribution" style="position: absolute;">[% map.copyright %]</div>
+ <div class="olControlAttribution" style="position: absolute;">[% map.copyright | safe %]</div>
[% END %]
<img id="loading-indicator" class="hidden" aria-hidden="true" src="/i/loading.svg" alt="Loading...">
diff --git a/templates/web/base/maps/wmts_config.html b/templates/web/base/maps/wmts_config.html
index 0b80a055b..680de57e3 100644
--- a/templates/web/base/maps/wmts_config.html
+++ b/templates/web/base/maps/wmts_config.html
@@ -3,12 +3,12 @@
fixmystreet.wmts_config = {
'map_projection': '[% map.map_projection %]',
'tile_dpi': [% map.tile_dpi %],
- 'tile_urls': [% map.tile_urls %],
+ 'tile_urls': [% map.tile_urls | safe %],
'tile_suffix': '[% map.tile_suffix %]',
- 'layer_names': [% map.layer_names %],
+ 'layer_names': [% map.layer_names | safe %],
'layer_style': '[% map.layer_style %]',
'matrix_set': '[% map.matrix_set %]',
- 'scales': [% map.scales %],
+ 'scales': [% map.scales | safe %],
'origin_x': [% map.origin_x %],
'origin_y': [% map.origin_y %]
};
diff --git a/templates/web/base/my/my.html b/templates/web/base/my/my.html
index ae2683309..04c5b6941 100644
--- a/templates/web/base/my/my.html
+++ b/templates/web/base/my/my.html
@@ -6,7 +6,7 @@
%]
[% IF problems.size %]
- [% map_html %]
+ [% map_html | safe %]
</div>
<div id="map_sidebar">
<div id="side">
diff --git a/templates/web/base/my/planned.html b/templates/web/base/my/planned.html
index 366a554d9..d5fcc48ae 100644
--- a/templates/web/base/my/planned.html
+++ b/templates/web/base/my/planned.html
@@ -6,7 +6,7 @@
%]
[% IF problems.size %]
- [% map_html %]
+ [% map_html | safe %]
</div>
<div id="map_sidebar">
<div id="side">
diff --git a/templates/web/base/pagination.html b/templates/web/base/pagination.html
index 9efdc3d78..a52632a25 100644
--- a/templates/web/base/pagination.html
+++ b/templates/web/base/pagination.html
@@ -1,4 +1,4 @@
-[% IF pager.total_entries > 1 %]
+[% IF pager AND pager.total_entries > 1 %]
<p class="pagination" data-page="[% pager.current_page | html %]">
[% IF pager.previous_page %]
<a class="prev" href="[% c.uri_with({ $param => pager.previous_page, ajax => undefined }) %][% '#' _ hash IF hash %]">[% loc('Previous') %]</a>
diff --git a/templates/web/base/questionnaire/index.html b/templates/web/base/questionnaire/index.html
index 4b6ce82f9..36123013f 100644
--- a/templates/web/base/questionnaire/index.html
+++ b/templates/web/base/questionnaire/index.html
@@ -5,7 +5,7 @@
INCLUDE 'header.html', title = loc('Questionnaire');
%]
-[% map_html %]
+[% map_html | safe %]
</div>
@@ -23,7 +23,9 @@
[% IF errors %]
<ul class="error questionnaire-errors">
-<li>[% errors.join("</li>\n<li>") %]</li>
+ [% FOR error IN errors %]
+ <li>[% error %]</li>
+ [% END %]
</ul>
[% END %]
diff --git a/templates/web/base/report/_item.html b/templates/web/base/report/_item.html
index 200c690a6..140abdbce 100644
--- a/templates/web/base/report/_item.html
+++ b/templates/web/base/report/_item.html
@@ -98,12 +98,12 @@
[%# We don't want to output shortlist on report page (in duplicate list) %]
[% ELSIF page == 'around' ~%]
[%# The around page list is already contained within the new report form %]
- [% item_action.replace('("shortlist-[^"]*)', '$1-' _ problem.id) %]
+ [% item_action.replace('("shortlist-[^"]*)', '$1-' _ problem.id) | safe %]
[% ELSE ~%]
<form method="post" action="/my/planned/change">
<input type="hidden" name="id" value="[% problem.id %]">
<input type="hidden" name="token" value="[% csrf_token %]">
- [% item_action %]
+ [% item_action | safe %]
</form>
[% END ~%]
[% END %]
diff --git a/templates/web/base/report/_main.html b/templates/web/base/report/_main.html
index e4612cc4a..9a498c619 100644
--- a/templates/web/base/report/_main.html
+++ b/templates/web/base/report/_main.html
@@ -48,7 +48,7 @@ can_moderate_title = c.user.can_moderate_title(problem, can_moderate)
[% END %]
[% FOR error IN moderate_errors %]
- <p class="form-error js-moderation-error">[% error %]</p>
+ <p class="form-error js-moderation-error">[% error | safe %]</p>
[% END %]
[% IF can_moderate_title %]
diff --git a/templates/web/base/report/display.html b/templates/web/base/report/display.html
index ade6b808e..f08df931d 100644
--- a/templates/web/base/report/display.html
+++ b/templates/web/base/report/display.html
@@ -3,14 +3,14 @@
PROCESS "report/photo-js.html";
PROCESS "maps/${map.type}.html";
- problem_title = problem.title_safe _ ' - ' _ loc('Viewing a problem');
+ problem_title = tprintf('%s - %s', problem.title_safe, loc('Viewing a problem'));
INCLUDE 'header.html'
title = problem_title
rss = [ tprintf(loc('Updates to this problem, %s', "%s is the site name"), site_name), "/rss/$problem.id" ]
robots = 'index, nofollow';
%]
-[% map_html %]
+[% map_html | safe %]
</div>
<div id="map_sidebar">
@@ -66,7 +66,7 @@
</div>
- [% second_column %]
+ [% second_column | safe %]
[% IF two_column_sidebar %]
</div>
diff --git a/templates/web/base/report/new/category_extras.html b/templates/web/base/report/new/category_extras.html
index 0d8f20265..f3293bbbb 100644
--- a/templates/web/base/report/new/category_extras.html
+++ b/templates/web/base/report/new/category_extras.html
@@ -14,7 +14,7 @@
<p class="form-section-description">
[% tprintf(
loc('Help <strong>%s</strong> resolve your problem quicker, by providing some extra detail. This extra information will not be published online.'),
- list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' )
+ mark_safe(list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' ))
); %]
</p>
[% INCLUDE 'report/new/category_extras_fields.html' metas=category_extras.$category %]
diff --git a/templates/web/base/report/new/category_extras_fields.html b/templates/web/base/report/new/category_extras_fields.html
index 9ab9722cf..2c728481c 100644
--- a/templates/web/base/report/new/category_extras_fields.html
+++ b/templates/web/base/report/new/category_extras_fields.html
@@ -8,7 +8,7 @@
[% ELSIF meta.variable != 'false' || NOT hide_notices %]
- <label for="[% cat_prefix %]form_[% meta_name %]">[% meta.description OR meta.code %]</label>
+ <label for="[% cat_prefix %]form_[% meta_name %]">[% (meta.description OR meta.code) | safe %]</label>
[% TRY %][% INCLUDE 'report/new/_category_extra_field_notice.html' %][% CATCH file %][% END %]
[% IF field_errors.$x_meta_name %]
<p class='form-error'>[% field_errors.$x_meta_name %]</p>
diff --git a/templates/web/base/report/new/category_wrapper.html b/templates/web/base/report/new/category_wrapper.html
index 32785b450..15616221c 100644
--- a/templates/web/base/report/new/category_wrapper.html
+++ b/templates/web/base/report/new/category_wrapper.html
@@ -21,7 +21,7 @@
[% IF disable_form_message %]
<div id="js-category-stopper" class="box-warning" role="alert" aria-live="assertive">
- [% disable_form_message %]
+ [% disable_form_message | safe %]
</div>
[% ELSE %]
<div id="js-post-category-messages" class="js-hide-if-invalid-category_extras">
diff --git a/templates/web/base/report/new/councils_text_all.html b/templates/web/base/report/new/councils_text_all.html
index 63f4125f4..da512c980 100644
--- a/templates/web/base/report/new/councils_text_all.html
+++ b/templates/web/base/report/new/councils_text_all.html
@@ -6,14 +6,14 @@
tprintf(
loc('These will be sent to <strong>%s</strong> and also published online for others to see, in accordance with our <a href="%s">privacy policy</a>.'),
- list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' ), c.cobrand.privacy_policy_url
+ mark_safe(list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' )), c.cobrand.privacy_policy_url
);
ELSE;
tprintf(
loc('These will be sent to <strong>%s</strong> but not published online.'),
- list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' )
+ mark_safe(list_of_names.join( '</strong>' _ loc(' or ') _ '<strong>' ))
);
END %]
diff --git a/templates/web/base/report/new/fill_in_details.html b/templates/web/base/report/new/fill_in_details.html
index fa7aabce3..8db096c96 100644
--- a/templates/web/base/report/new/fill_in_details.html
+++ b/templates/web/base/report/new/fill_in_details.html
@@ -30,7 +30,7 @@
<input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% longitude | html %]">
[% IF report.used_map %]
- [% map_html %]
+ [% map_html | safe %]
</div>
<div id="map_sidebar">
<div id="side-form">
diff --git a/templates/web/base/report/new/fill_in_details_form.html b/templates/web/base/report/new/fill_in_details_form.html
index 448941647..3954e1e43 100644
--- a/templates/web/base/report/new/fill_in_details_form.html
+++ b/templates/web/base/report/new/fill_in_details_form.html
@@ -26,7 +26,7 @@
<p class="form-error">[% loc('Sorry, we could not log you in. Please fill in the form below.') %]</p>
[% END %]
-[% sidebar_html %]
+[% sidebar_html | safe %]
[% INCLUDE 'errors.html' %]
diff --git a/templates/web/base/report/new/login_success_form.html b/templates/web/base/report/new/login_success_form.html
index 22da33265..32c414bda 100644
--- a/templates/web/base/report/new/login_success_form.html
+++ b/templates/web/base/report/new/login_success_form.html
@@ -2,7 +2,7 @@
<p class='form-success'>[% loc('You have successfully signed in; please check and confirm your details are accurate:') %]</p>
-[% sidebar_html %]
+[% sidebar_html | safe %]
[% INCLUDE 'errors.html' %]
diff --git a/templates/web/base/report/new/oauth_email_form.html b/templates/web/base/report/new/oauth_email_form.html
index a5ca1c290..a0adbe563 100644
--- a/templates/web/base/report/new/oauth_email_form.html
+++ b/templates/web/base/report/new/oauth_email_form.html
@@ -5,7 +5,7 @@
[% loc('We need your email address, please give it below.') %]
</p>
-[% sidebar_html %]
+[% sidebar_html | safe %]
[% INCLUDE 'errors.html' %]
diff --git a/templates/web/base/reports/_list-filters.html b/templates/web/base/reports/_list-filters.html
index 77c257e01..08132cef7 100644
--- a/templates/web/base/reports/_list-filters.html
+++ b/templates/web/base/reports/_list-filters.html
@@ -23,7 +23,7 @@
[% END %]
<p class="report-list-filters">
- [% tprintf(loc('<label for="statuses">Show</label> %s reports <label for="filter_categories">about</label> %s', "The first %s is a dropdown of all/fixed/etc, the second is a dropdown of categories"), select_status, select_category) %]
+ [% tprintf(loc('<label for="statuses">Show</label> %s reports <label for="filter_categories">about</label> %s', "The first %s is a dropdown of all/fixed/etc, the second is a dropdown of categories"), mark_safe(select_status), mark_safe(select_category)) %]
<input type="submit" name="filter_update" value="[% loc('Go') %]">
</p>
diff --git a/templates/web/base/reports/body.html b/templates/web/base/reports/body.html
index 23540104b..d723a7992 100755
--- a/templates/web/base/reports/body.html
+++ b/templates/web/base/reports/body.html
@@ -32,7 +32,7 @@
rss = [ tprintf(loc('Problems within %s, %s', "First %s is the body name, second %s the site name"), name, site_name), rss_url ]
%]
-[% map_html %]
+[% map_html | safe %]
[% IF c.user && c.user.has_body_permission_to('planned_reports') %]
<p class="sub-map-links" id="sub_map_links">
diff --git a/templates/web/base/reports/index.html b/templates/web/base/reports/index.html
index dfb99f089..dcad59dad 100755
--- a/templates/web/base/reports/index.html
+++ b/templates/web/base/reports/index.html
@@ -25,7 +25,7 @@
<h2>[% loc('All time') %]</h2>
<div class="labelled-line-chart">
<canvas id="chart-all-reports" width="600" height="300"
- data-labels="[&quot;[% problem_periods.join('&quot;,&quot;') %]&quot;]"
+ data-labels="[[% FOR period IN problem_periods %]&quot;[% period %]&quot;[% IF NOT loop.last %],[% END %][% END %]]"
data-values-reports="[[% problems_reported_by_period.join(',') %]]"
data-values-fixed="[[% problems_fixed_by_period.join(',') %]]"
></canvas>
diff --git a/templates/web/fiksgatami/header.html b/templates/web/fiksgatami/header.html
index 2d0f163e7..80235194c 100644
--- a/templates/web/fiksgatami/header.html
+++ b/templates/web/fiksgatami/header.html
@@ -28,7 +28,7 @@
</div>
</header>
- [% pre_container_extra %]
+ [% pre_container_extra | safe %]
<div class="container">
<div class="content[% " $mainclass" | html IF mainclass %]" role="main">
diff --git a/templates/web/fixmystreet.com/header/css.html b/templates/web/fixmystreet.com/header/css.html
index 00ec6befa..14dc98d44 100644
--- a/templates/web/fixmystreet.com/header/css.html
+++ b/templates/web/fixmystreet.com/header/css.html
@@ -34,4 +34,4 @@ document.getElementById('preload_base_css').onload = function(){this.onload=null
<link rel="stylesheet" href="[% layout_css %]">
<![endif]-->
-[% extra_css %]
+[% extra_css | safe %]
diff --git a/templates/web/hart/header.html b/templates/web/hart/header.html
index a375fdb7d..fd5c70dd1 100644
--- a/templates/web/hart/header.html
+++ b/templates/web/hart/header.html
@@ -34,7 +34,7 @@
</div>
</header>
- [% pre_container_extra %]
+ [% pre_container_extra | safe %]
<div class="container">
<div class="content[% " $mainclass" | html IF mainclass %]" role="main">
diff --git a/templates/web/oxfordshire/header.html b/templates/web/oxfordshire/header.html
index eaf601b1b..58df22db5 100644
--- a/templates/web/oxfordshire/header.html
+++ b/templates/web/oxfordshire/header.html
@@ -38,7 +38,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<div class="nav-spacer"></div>
- [% pre_container_extra %]
+ [% pre_container_extra | safe %]
<div class="container">
<div class="content[% " $mainclass" | html IF mainclass %]" role="main">
diff --git a/templates/web/oxfordshire/main_nav.html b/templates/web/oxfordshire/main_nav.html
index f7bc619e2..1d052de34 100644
--- a/templates/web/oxfordshire/main_nav.html
+++ b/templates/web/oxfordshire/main_nav.html
@@ -4,8 +4,8 @@
SET ul_class="nav-menu nav-menu--main" UNLESS ul_class.defined;
%]
[% BLOCK navitem ~%]
- <li [% liattrs %]>
- <a href="[% uri %][% suffix IF suffix %]" [% attrs %]>[% label %]</a>
+ <li [% liattrs | safe %]>
+ <a href="[% uri %][% suffix IF suffix %]" [% attrs | safe %]>[% label %]</a>
</li>
[%~ END %]
diff --git a/templates/web/stevenage/header.html b/templates/web/stevenage/header.html
index 0fe6dfed1..cda0c1757 100644
--- a/templates/web/stevenage/header.html
+++ b/templates/web/stevenage/header.html
@@ -24,7 +24,7 @@
<a href="#main-nav" id="nav-link">Main Navigation</a>
</div>
</header>
- [% pre_container_extra %]
+ [% pre_container_extra | safe %]
<div class="container">
<div class="content[% " $mainclass" | html IF mainclass %]" role="main">
diff --git a/templates/web/zurich/admin/bodies/body.html b/templates/web/zurich/admin/bodies/body.html
index aab038ff8..5a1a2aea4 100644
--- a/templates/web/zurich/admin/bodies/body.html
+++ b/templates/web/zurich/admin/bodies/body.html
@@ -35,7 +35,7 @@
[% IF errors %]
<div class="fms-admin-warning">
- [% errors.values.join('<br>') %]
+ [% FOR error IN errors.values %][% error %][% IF NOT loop.last %]<br>[% END %][% END %]
</div>
[% END %]
diff --git a/templates/web/zurich/admin/report_edit-sdm.html b/templates/web/zurich/admin/report_edit-sdm.html
index 8d25ab40a..e44119124 100644
--- a/templates/web/zurich/admin/report_edit-sdm.html
+++ b/templates/web/zurich/admin/report_edit-sdm.html
@@ -7,7 +7,7 @@
PROCESS 'admin/report_blocks.html'
-%]
-[% map_html %]
+[% map_html | safe %]
</div>
<div id="map_sidebar">
diff --git a/templates/web/zurich/admin/reports/edit.html b/templates/web/zurich/admin/reports/edit.html
index 4b0490b4a..235631748 100644
--- a/templates/web/zurich/admin/reports/edit.html
+++ b/templates/web/zurich/admin/reports/edit.html
@@ -7,7 +7,7 @@
PROCESS 'admin/report_blocks.html'
-%]
-[% map_html %]
+[% map_html | safe %]
</div>
<div id="map_sidebar">
diff --git a/templates/web/zurich/header.html b/templates/web/zurich/header.html
index cd08e9503..06b0558d7 100644
--- a/templates/web/zurich/header.html
+++ b/templates/web/zurich/header.html
@@ -79,6 +79,6 @@
[% INCLUDE 'nav_over_content.html' %]
[% END %]
- [% pre_container_extra %]
+ [% pre_container_extra | safe %]
<!-- [% INCLUDE 'debug_header.html' %] -->
diff --git a/templates/web/zurich/maps/noscript_map.html b/templates/web/zurich/maps/noscript_map.html
index 4925f9260..86cbdaec8 100644
--- a/templates/web/zurich/maps/noscript_map.html
+++ b/templates/web/zurich/maps/noscript_map.html
@@ -6,7 +6,7 @@
[%- FOR tile IN row -%]
[%- top_px = tile.row_offset * map.tile_size -%]
[%- left_px = tile.col_offset * map.tile_size %]
- <[% map.img_type %]
+ <[% map.img_type | safe %]
class="square-map__tile"
alt="[% tile.alt %]"
id="[% nsm_prefix %]t[% tile.dotted_id %]"
@@ -23,23 +23,23 @@
[% ELSE %]
<div class="noscript">
<div id="[% nsm_prefix %]drag">
- <[% map.img_type %]
+ <[% map.img_type | safe %]
alt="NW map tile" id="[% nsm_prefix %]t2.2"
name="tile_[% map.x_tile - 1 %].[% map.y_tile - 1 %]"
src="[% map.tiles.0 %]"
style="top:0; left:0;">
- <[% map.img_type %]
+ <[% map.img_type | safe %]
alt="NE map tile" id="[% nsm_prefix %]t2.3"
name="tile_[% map.x_tile %].[% map.y_tile - 1 %]"
src="[% map.tiles.1 %]"
style="top:0px; left:256px;">
<br>
- <[% map.img_type %]
+ <[% map.img_type | safe %]
alt="SW map tile" id="[% nsm_prefix %]t3.2"
name="tile_[% map.x_tile - 1 %].[% map.y_tile %]"
src="[% map.tiles.2 %]"
style="top:256px; left:0;">
- <[% map.img_type %]
+ <[% map.img_type | safe %]
alt="SE map tile" id="[% nsm_prefix %]t3.3"
name="tile_[% map.x_tile %].[% map.y_tile %]"
src="[% map.tiles.3 %]"
diff --git a/templates/web/zurich/maps/zurich.html b/templates/web/zurich/maps/zurich.html
index 33c70bb0f..f3a9bdc7f 100644
--- a/templates/web/zurich/maps/zurich.html
+++ b/templates/web/zurich/maps/zurich.html
@@ -7,7 +7,7 @@
[% INCLUDE maps/wmts_config.html %]
[% UNLESS around_page %]
<p class="sub-map-links" id="sub_map_links">
- [% map_sub_links %]
+ [% map_sub_links | safe %]
</p>
[% END %]
[% END %]
diff --git a/templates/web/zurich/report/new/fill_in_details_form.html b/templates/web/zurich/report/new/fill_in_details_form.html
index 4c266bbad..376429dad 100644
--- a/templates/web/zurich/report/new/fill_in_details_form.html
+++ b/templates/web/zurich/report/new/fill_in_details_form.html
@@ -1,4 +1,4 @@
-[% sidebar_html %]
+[% sidebar_html | safe %]
<div id="report-a-problem-main">
<h1>[% loc('Reporting a problem') %]</h1>
diff --git a/templates/web/zurich/reports/index.html b/templates/web/zurich/reports/index.html
index d6d7a541a..f2a604c25 100755
--- a/templates/web/zurich/reports/index.html
+++ b/templates/web/zurich/reports/index.html
@@ -5,7 +5,7 @@
INCLUDE 'header.html',
title = loc('Summary reports');
%]
-[% map_html %]
+[% map_html | safe %]
</div>
<div id="map_sidebar">