aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-01-31 17:09:49 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-01-31 17:09:49 +0000
commit352f8c61fb42d07a277d73f2d26e491f2a24d386 (patch)
treec5f8b3261f2d35bb4182981a346a47cbbd3915d0
parentfe1166d94c40d230feec3b4ea372c5598790c77d (diff)
Have to filter in a separate line from tprintf.
-rw-r--r--templates/web/default/admin/report_edit.html5
-rw-r--r--templates/web/zurich/admin/report_edit-sdm.html10
-rw-r--r--templates/web/zurich/admin/report_edit.html15
3 files changed, 24 insertions, 6 deletions
diff --git a/templates/web/default/admin/report_edit.html b/templates/web/default/admin/report_edit.html
index 8eb12b50d..cd5072d00 100644
--- a/templates/web/default/admin/report_edit.html
+++ b/templates/web/default/admin/report_edit.html
@@ -15,7 +15,10 @@
<textarea name='detail' id='detail' cols=60 rows=10>[% problem.detail | html %]</textarea></li>
<li>[% loc('Co-ordinates:') %] [% problem.latitude %], [% problem.longitude %]
-( [% tprintf( loc('originally entered: &ldquo;%s&rdquo;'), problem.postcode | html ) %],
+( [%
+ SET postcode_safe = problem.postcode | html;
+ tprintf( loc('originally entered: &ldquo;%s&rdquo;'), postcode_safe )
+%],
[% IF problem.used_map %][% loc('used map') %][% ELSE %][% loc("didn't use map") %][% END %])</li>
<li>[% loc('For council(s):') %] [% IF problem.bodies_str %][% problem.bodies_str %][% ELSE %]<em>[% loc('None' ) %]</em>[% END %] ([% loc('other areas:') %] [% problem.areas | remove('^,') | remove( ',$' ) %])</li>
diff --git a/templates/web/zurich/admin/report_edit-sdm.html b/templates/web/zurich/admin/report_edit-sdm.html
index 0a0e4ed58..ec65046cb 100644
--- a/templates/web/zurich/admin/report_edit-sdm.html
+++ b/templates/web/zurich/admin/report_edit-sdm.html
@@ -13,11 +13,17 @@
<li><a href="[% c.uri_for_email( '/report', problem.id ) %]">[% loc('View report on site' )%]</a></li>
<li>[% loc('Details:') %] [% problem.detail | html %]
[% IF problem.extra.original_detail %]
-<br>[% tprintf( loc('originally entered: &ldquo;%s&rdquo;'), problem.extra.original_detail | html ) %]
+<br>[%
+ SET safe = problem.extra.original_detail | html;
+ tprintf( loc('originally entered: &ldquo;%s&rdquo;'), safe )
+%]
[% END %]
</li>
<li>[% loc('Co-ordinates:') %] [% problem.local_coords.join(',') %] ([% problem.latitude %],[% problem.longitude %])
-([% tprintf( loc('originally entered: &ldquo;%s&rdquo;'), problem.postcode | html ) %],
+([%
+ SET safe = problem.postcode | html;
+ tprintf( loc('originally entered: &ldquo;%s&rdquo;'), safe )
+%],
[% IF problem.used_map %][% loc('used map') %][% ELSE %][% loc("didn't use map") %][% END %])</li>
<li>[% loc('Category:') %] [% problem.category | html %] </li>
diff --git a/templates/web/zurich/admin/report_edit.html b/templates/web/zurich/admin/report_edit.html
index 9c612065f..8e9a52ab5 100644
--- a/templates/web/zurich/admin/report_edit.html
+++ b/templates/web/zurich/admin/report_edit.html
@@ -21,7 +21,10 @@
[% IF problem.state == 'fixed - council' OR problem.state == 'closed' %]
<li>[% loc('Details:') %] [% problem.detail | html %]
[% IF problem.extra.original_detail %]
- <br>[% tprintf( loc('originally entered: &ldquo;%s&rdquo;'), problem.extra.original_detail | html ) %]
+ <br>[%
+ SET detail_safe = problem.extra.original_detail | html;
+ tprintf( loc('originally entered: &ldquo;%s&rdquo;'), detail_safe )
+ %]
[% END %]
</li>
[% ELSE %]
@@ -29,13 +32,19 @@
<li><label for='detail'>[% loc('Details:') %]</label>
<textarea name='detail' id='detail' cols=60 rows=5>[% problem.detail | html %]</textarea>
[% IF problem.extra.original_detail %]
- [% tprintf( loc('originally entered: &ldquo;%s&rdquo;'), problem.extra.original_detail | html ) %]
+ [%
+ SET detail_safe = problem.extra.original_detail | html;
+ tprintf( loc('originally entered: &ldquo;%s&rdquo;'), detail_safe )
+ %]
[% END %]
</li>
[% END %]
<li>[% loc('Co-ordinates:') %] [% problem.local_coords.join(',') %] ([% problem.latitude %],[% problem.longitude %])
-([% tprintf( loc('originally entered: &ldquo;%s&rdquo;'), problem.postcode | html ) %],
+([%
+ SET safe = problem.postcode | html;
+ tprintf( loc('originally entered: &ldquo;%s&rdquo;'), safe )
+%],
[% IF problem.used_map %][% loc('used map') %][% ELSE %][% loc("didn't use map") %][% END %])</li>
<li>[% loc('Name:') %] [% problem.name | html %] <input type='hidden' name='name' id='name' value='[% problem.name | html %]'></li>