From ddb5db354ac1b55ce99c9d0e977a2a63099f4c21 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Fri, 23 Jul 2010 00:46:02 +0200 Subject: Bug 398701: Replace |FILTER url_quote| by |FILTER uri| r/a=mkanat --- Bugzilla/Template.pm | 6 ----- docs/en/xml/customization.xml | 15 +++--------- t/008filter.t | 4 ++-- .../en/default/account/email/change-new.txt.tmpl | 4 ++-- .../en/default/account/email/change-old.txt.tmpl | 2 +- .../en/default/account/email/request-new.txt.tmpl | 4 ++-- .../account/password/forgotten-password.txt.tmpl | 4 ++-- .../default/account/prefs/saved-searches.html.tmpl | 18 +++++++------- .../en/default/account/profile-activity.html.tmpl | 2 +- .../default/admin/classifications/edit.html.tmpl | 2 +- .../default/admin/classifications/select.html.tmpl | 6 ++--- .../admin/components/confirm-delete.html.tmpl | 4 ++-- .../en/default/admin/components/edit.html.tmpl | 8 +++---- .../en/default/admin/components/footer.html.tmpl | 6 ++--- .../en/default/admin/components/list.html.tmpl | 10 ++++---- .../en/default/admin/custom_fields/edit.html.tmpl | 2 +- .../admin/fieldvalues/confirm-delete.html.tmpl | 14 +++++------ .../en/default/admin/fieldvalues/footer.html.tmpl | 8 +++---- .../en/default/admin/fieldvalues/list.html.tmpl | 4 ++-- template/en/default/admin/groups/delete.html.tmpl | 8 +++---- template/en/default/admin/keywords/edit.html.tmpl | 2 +- .../admin/milestones/confirm-delete.html.tmpl | 4 ++-- .../en/default/admin/milestones/footer.html.tmpl | 10 ++++---- .../en/default/admin/milestones/list.html.tmpl | 8 +++---- .../en/default/admin/params/editparams.html.tmpl | 2 +- template/en/default/admin/params/index.html.tmpl | 2 +- .../admin/products/confirm-delete.html.tmpl | 10 ++++---- template/en/default/admin/products/edit.html.tmpl | 10 ++++---- .../en/default/admin/products/footer.html.tmpl | 6 ++--- template/en/default/admin/products/list.html.tmpl | 2 +- .../en/default/admin/products/updated.html.tmpl | 4 ++-- .../default/admin/sanitycheck/messages.html.tmpl | 8 +++---- template/en/default/admin/table.html.tmpl | 2 +- .../default/admin/users/confirm-delete.html.tmpl | 14 +++++------ .../default/admin/users/listselectvars.html.tmpl | 4 ++-- .../default/admin/users/responsibilities.html.tmpl | 4 ++-- template/en/default/admin/users/userdata.html.tmpl | 2 +- .../admin/versions/confirm-delete.html.tmpl | 4 ++-- .../en/default/admin/versions/footer.html.tmpl | 10 ++++---- template/en/default/admin/versions/list.html.tmpl | 8 +++---- .../attachment/cancel-create-dupe.html.tmpl | 4 ++-- .../en/default/attachment/diff-header.html.tmpl | 6 ++--- .../en/default/bug/create/create-guided.html.tmpl | 4 ++-- template/en/default/bug/create/create.html.tmpl | 2 +- template/en/default/bug/dependency-tree.html.tmpl | 2 +- template/en/default/bug/field-label.html.tmpl | 2 +- template/en/default/bug/navigate.html.tmpl | 24 +++++++++---------- template/en/default/bug/show-multiple.html.tmpl | 2 +- template/en/default/config.rdf.tmpl | 28 +++++++++++----------- .../default/global/choose-classification.html.tmpl | 12 +++++----- .../en/default/global/choose-product.html.tmpl | 6 ++--- template/en/default/global/common-links.html.tmpl | 4 ++-- template/en/default/global/messages.html.tmpl | 6 ++--- .../en/default/global/site-navigation.html.tmpl | 6 ++--- template/en/default/global/useful-links.html.tmpl | 8 +++---- template/en/default/global/user-error.html.tmpl | 22 ++++++++--------- template/en/default/list/list.html.tmpl | 12 +++++----- template/en/default/list/list.ics.tmpl | 4 ++-- template/en/default/list/quips.html.tmpl | 2 +- template/en/default/list/table.html.tmpl | 8 +++---- template/en/default/reports/components.html.tmpl | 4 ++-- template/en/default/reports/create-chart.html.tmpl | 6 ++--- .../en/default/reports/delete-series.html.tmpl | 2 +- .../en/default/reports/duplicates-table.html.tmpl | 8 +++---- template/en/default/reports/edit-series.html.tmpl | 6 ++--- template/en/default/reports/keywords.html.tmpl | 4 ++-- template/en/default/reports/report-table.html.tmpl | 10 ++++---- template/en/default/reports/report.html.tmpl | 6 ++--- template/en/default/sidebar.xul.tmpl | 4 ++-- 69 files changed, 223 insertions(+), 238 deletions(-) diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index ffd702e62..aca7cb9f0 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -674,12 +674,6 @@ sub create { xml => \&Bugzilla::Util::xml_quote , - # This filter escapes characters in a variable or value string for - # use in a query string. It escapes all characters NOT in the - # regex set: [a-zA-Z0-9_\-.]. The 'uri' filter should be used for - # a full URL that may have characters that need encoding. - url_quote => \&Bugzilla::Util::url_quote , - # This filter is similar to url_quote but used a \ instead of a % # as prefix. In addition it replaces a ' ' by a '_'. css_class_quote => \&Bugzilla::Util::css_class_quote , diff --git a/docs/en/xml/customization.xml b/docs/en/xml/customization.xml index f397cff53..9b62b1d0b 100644 --- a/docs/en/xml/customization.xml +++ b/docs/en/xml/customization.xml @@ -207,20 +207,11 @@ This means that if the data can possibly contain special HTML characters such as <, and the data was not intended to be HTML, they need to be converted to entity form, i.e. &lt;. You use the 'html' filter in the - Template Toolkit to do this. If you forget, you may open up - your installation to cross-site scripting attacks. + Template Toolkit to do this (or the 'uri' filter to encode special + characters in URLs). If you forget, you may open up your installation + to cross-site scripting attacks. - - Also note that Bugzilla adds a few filters of its own, that are not - in standard Template Toolkit. In particular, the 'url_quote' filter - can convert characters that are illegal or have special meaning in URLs, - such as &, to the encoded form, i.e. %26. This actually encodes most - characters (but not the common ones such as letters and numbers and so - on), including the HTML-special characters, so there's never a need to - HTML filter afterwards. - - Editing templates is a good way of doing a poor man's custom fields. diff --git a/t/008filter.t b/t/008filter.t index 5a5b223c8..0c38380df 100644 --- a/t/008filter.t +++ b/t/008filter.t @@ -223,8 +223,8 @@ sub directive_ok { # Things which are already filtered # Note: If a single directive prints two things, and only one is # filtered, we may not catch that case. - return 1 if $directive =~ /FILTER\ (html|csv|js|base64|url_quote|css_class_quote| - ics|quoteUrls|time|uri|xml|lower|html_light| + return 1 if $directive =~ /FILTER\ (html|csv|js|base64|css_class_quote|ics| + quoteUrls|time|uri|xml|lower|html_light| obsolete|inactive|closed|unitconvert| txt|html_linebreak|none)\b/x; diff --git a/template/en/default/account/email/change-new.txt.tmpl b/template/en/default/account/email/change-new.txt.tmpl index 5803b0274..b40ab9852 100644 --- a/template/en/default/account/email/change-new.txt.tmpl +++ b/template/en/default/account/email/change-new.txt.tmpl @@ -30,12 +30,12 @@ for the account [% oldemailaddress %] to your address. To confirm the change, visit the following link: -[%+ urlbase %]token.cgi?t=[% token FILTER url_quote %]&a=cfmem +[%+ urlbase %]token.cgi?t=[% token FILTER uri %]&a=cfmem If you are not the person who made this request, or you wish to cancel this request, visit the following link: -[%+ urlbase %]token.cgi?t=[% token FILTER url_quote %]&a=cxlem +[%+ urlbase %]token.cgi?t=[% token FILTER uri %]&a=cxlem If you do nothing, the request will lapse after [% constants.MAX_TOKEN_AGE %] days (on [% expiration_ts FILTER time("%B %e, %Y at %H:%M %Z") %]). diff --git a/template/en/default/account/email/change-old.txt.tmpl b/template/en/default/account/email/change-old.txt.tmpl index 6b7774420..ee66c0f24 100644 --- a/template/en/default/account/email/change-old.txt.tmpl +++ b/template/en/default/account/email/change-old.txt.tmpl @@ -39,7 +39,7 @@ for your account to [%+ newemailaddress %]. If you are not the person who made this request, or you wish to cancel this request, visit the following link: -[%+ urlbase %]token.cgi?t=[% token FILTER url_quote %]&a=cxlem +[%+ urlbase %]token.cgi?t=[% token FILTER uri %]&a=cxlem If you do nothing, and [%+ newemailaddress %] confirms this request, the change will be made permanent after [% constants.MAX_TOKEN_AGE %] days diff --git a/template/en/default/account/email/request-new.txt.tmpl b/template/en/default/account/email/request-new.txt.tmpl index c56054b94..8fb36926f 100644 --- a/template/en/default/account/email/request-new.txt.tmpl +++ b/template/en/default/account/email/request-new.txt.tmpl @@ -32,7 +32,7 @@ using your email address ([% email %]). To continue creating an account using this email address, visit the following link by [% expiration_ts FILTER time("%B %e, %Y at %H:%M %Z") %]: -[%+ urlbase %]token.cgi?t=[% token FILTER url_quote %]&a=request_new_account +[%+ urlbase %]token.cgi?t=[% token FILTER uri %]&a=request_new_account If you did not receive this email before [% expiration_ts FILTER time("%B %e, %Y at %H:%M %Z") %] or you wish to create an account using a different email address you can begin @@ -50,7 +50,7 @@ Hotmail, or similar) to avoid receiving spam at your primary email address. If you do not wish to create an account, or if this request was made in error you can do nothing or visit the following link: -[%+ urlbase %]token.cgi?t=[% token FILTER url_quote %]&a=cancel_new_account +[%+ urlbase %]token.cgi?t=[% token FILTER uri %]&a=cancel_new_account If the above links do not work, or you have any other issues regarding your account, please contact administration at [% Param('maintainer') %]. diff --git a/template/en/default/account/password/forgotten-password.txt.tmpl b/template/en/default/account/password/forgotten-password.txt.tmpl index 574975c85..e014658dc 100644 --- a/template/en/default/account/password/forgotten-password.txt.tmpl +++ b/template/en/default/account/password/forgotten-password.txt.tmpl @@ -28,12 +28,12 @@ X-Bugzilla-Type: admin You have (or someone impersonating you has) requested to change your [%+ terms.Bugzilla %] password. To complete the change, visit the following link: -[%+ urlbase %]token.cgi?t=[% token FILTER url_quote %]&a=cfmpw +[%+ urlbase %]token.cgi?t=[% token FILTER uri %]&a=cfmpw If you are not the person who made this request, or you wish to cancel this request, visit the following link: -[%+ urlbase %]token.cgi?t=[% token FILTER url_quote %]&a=cxlpw +[%+ urlbase %]token.cgi?t=[% token FILTER uri %]&a=cxlpw If you do nothing, the request will lapse after [% constants.MAX_TOKEN_AGE %] days (on [% expiration_ts FILTER time("%B %e, %Y at %H:%M %Z", timezone) %]) or when you diff --git a/template/en/default/account/prefs/saved-searches.html.tmpl b/template/en/default/account/prefs/saved-searches.html.tmpl index f1286134b..3cbc05abe 100644 --- a/template/en/default/account/prefs/saved-searches.html.tmpl +++ b/template/en/default/account/prefs/saved-searches.html.tmpl @@ -71,7 +71,7 @@ My [% terms.Bugs %] - [% filtered_username = user.login FILTER url_quote %] + [% filtered_username = user.login FILTER uri %] Run @@ -96,20 +96,20 @@ [% q.name FILTER html %] - Run + Run Edit + [% q.name FILTER uri %]">Edit [% IF q.used_in_whine %] Remove from whining first [% ELSE %] Forget + [% q.name FILTER uri %]&token= + [% issue_hash_token([q.id, q.name]) FILTER uri %]">Forget [% END %] @@ -187,12 +187,12 @@ [% q.shared_with_group.name FILTER html %] Run + [% q.name FILTER uri %]&sharer_id= + [% q.user.id FILTER uri %]">Run Edit + [% q.name FILTER uri %]">Edit Edit this user or search for other accounts [% IF listselectionvalues.matchtype != 'exact' %] diff --git a/template/en/default/admin/classifications/edit.html.tmpl b/template/en/default/admin/classifications/edit.html.tmpl index 2ef1725f3..17d04de67 100644 --- a/template/en/default/admin/classifications/edit.html.tmpl +++ b/template/en/default/admin/classifications/edit.html.tmpl @@ -29,7 +29,7 @@ - + Edit Products: diff --git a/template/en/default/admin/classifications/select.html.tmpl b/template/en/default/admin/classifications/select.html.tmpl index d6b352d02..bc78cbb6e 100644 --- a/template/en/default/admin/classifications/select.html.tmpl +++ b/template/en/default/admin/classifications/select.html.tmpl @@ -33,7 +33,7 @@ [% FOREACH cl = classifications %] - [% cl.name FILTER html %] + [% cl.name FILTER html %] [% IF cl.description %] [% cl.description FILTER html_light %] @@ -45,14 +45,14 @@ [% IF (cl.id == 1) %] [% cl.product_count FILTER html %] [% ELSE %] - reclassify ([% cl.product_count FILTER html %]) + reclassify ([% cl.product_count FILTER html %]) [% END %] [%# don't allow user to delete the default id. %] [% IF (cl.id == 1) %]   [% ELSE %] - delete + delete [% END %] [% END %] diff --git a/template/en/default/admin/components/confirm-delete.html.tmpl b/template/en/default/admin/components/confirm-delete.html.tmpl index d0a1385f1..e2caa5208 100644 --- a/template/en/default/admin/components/confirm-delete.html.tmpl +++ b/template/en/default/admin/components/confirm-delete.html.tmpl @@ -90,8 +90,8 @@ from '[% product.name FILTER html %]' product [% IF comp.bug_count %] [% comp.bug_count %] + href="buglist.cgi?component=[% comp.name FILTER uri %]&product= + [%- product.name FILTER uri %]">[% comp.bug_count %] [% ELSE %] None [% END %] diff --git a/template/en/default/admin/components/edit.html.tmpl b/template/en/default/admin/components/edit.html.tmpl index be14be054..e34e18d0c 100644 --- a/template/en/default/admin/components/edit.html.tmpl +++ b/template/en/default/admin/components/edit.html.tmpl @@ -48,8 +48,8 @@ [% IF comp.bug_count > 0 %] [% comp.bug_count %] + [%- comp.name FILTER uri %]&product= + [%- product.name FILTER uri %]">[% comp.bug_count %] [% ELSE %] None [% END %] @@ -64,8 +64,8 @@ or Delete this component. + [%- product.name FILTER uri %]&component= + [%- comp.name FILTER uri %]">Delete this component. diff --git a/template/en/default/admin/components/footer.html.tmpl b/template/en/default/admin/components/footer.html.tmpl index b2e105eb3..ec1869b29 100644 --- a/template/en/default/admin/components/footer.html.tmpl +++ b/template/en/default/admin/components/footer.html.tmpl @@ -33,7 +33,7 @@ Edit component + [%- product.name FILTER uri %]&component=[% comp.name FILTER uri %]"> '[% comp.name FILTER html %]' or edit [% END %] @@ -42,13 +42,13 @@ Edit other components of product '[% product.name FILTER html %]', + [%- product.name FILTER uri %]">'[% product.name FILTER html %]', or edit [% END %] product '[% product.name FILTER html %]'. + [%- product.name FILTER uri %]">'[% product.name FILTER html %]'.

diff --git a/template/en/default/admin/components/list.html.tmpl b/template/en/default/admin/components/list.html.tmpl index 632d47e6e..b62ce1bae 100644 --- a/template/en/default/admin/components/list.html.tmpl +++ b/template/en/default/admin/components/list.html.tmpl @@ -34,11 +34,11 @@ %] [% edit_contentlink = BLOCK %]editcomponents.cgi?action=edit&product= - [%- product.name FILTER url_quote %]&component=%%name%%[% END %] + [%- product.name FILTER uri %]&component=%%name%%[% END %] [% delete_contentlink = BLOCK %]editcomponents.cgi?action=del&product= - [%- product.name FILTER url_quote %]&component=%%name%%[% END %] + [%- product.name FILTER uri %]&component=%%name%%[% END %] [% bug_count_contentlink = BLOCK %]buglist.cgi?component=%%name%%&product= - [%- product.name FILTER url_quote %][% END %] + [%- product.name FILTER uri %][% END %] [% columns = [ @@ -111,12 +111,12 @@ overrides = overrides %] -

Add +

Add a new component to product '[% product.name FILTER html %]'

[% IF ! showbugcounts %] -

+

Redisplay table with [% terms.bug %] counts (slower)

[% END %] diff --git a/template/en/default/admin/custom_fields/edit.html.tmpl b/template/en/default/admin/custom_fields/edit.html.tmpl index 755c3642c..ec4e3276d 100644 --- a/template/en/default/admin/custom_fields/edit.html.tmpl +++ b/template/en/default/admin/custom_fields/edit.html.tmpl @@ -137,7 +137,7 @@   - Edit + Edit legal values for this field. diff --git a/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl b/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl index 81a5b0f96..547cac636 100644 --- a/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl +++ b/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl @@ -49,8 +49,8 @@ + href="buglist.cgi?[% field.name FILTER uri %]= + [%- value.name FILTER uri %]"> [%- value.bug_count FILTER html %] [% ELSE %] None @@ -94,8 +94,8 @@ + href="buglist.cgi?[% field.name FILTER uri %]= + [%- value.name FILTER uri %]"> [% IF value.bug_count > 1 %] those [% terms.bugs %] [% ELSE %] @@ -116,7 +116,7 @@
  • This value controls the visibility of the following fields:
    [% FOREACH field = value.controls_visibility_of_fields %]
    + [%- field.name FILTER uri %]"> [%- field.description FILTER html %] ([% field.name FILTER html %])
    [% END %] @@ -129,8 +129,8 @@ [% FOREACH field_name = value.controlled_values.keys %] [% FOREACH controlled = value.controlled_values.${field_name} %] + [%- controlled.field.name FILTER uri %]&value= + [%- controlled.name FILTER uri %]"> [% controlled.field.description FILTER html %] ([% controlled.field.name FILTER html %]): [%+ controlled.name FILTER html %]
    diff --git a/template/en/default/admin/fieldvalues/footer.html.tmpl b/template/en/default/admin/fieldvalues/footer.html.tmpl index 288612d4c..7d4a41d47 100644 --- a/template/en/default/admin/fieldvalues/footer.html.tmpl +++ b/template/en/default/admin/fieldvalues/footer.html.tmpl @@ -32,7 +32,7 @@ [% UNLESS no_add_link %] Add a value. + [%- field.name FILTER uri %]">Add a value. [% END %] [% IF value.defined && !no_edit_link %] @@ -40,15 +40,15 @@ title="Edit value '[% value.name FILTER html %]' for the ' [%- field.name FILTER html %]' field" href="editvalues.cgi?action=edit&field= - [%- field.name FILTER url_quote %]&value= - [%- value.name FILTER url_quote %]"> + [%- field.name FILTER uri %]&value= + [%- value.name FILTER uri %]"> '[% value.name FILTER html %]'. [% END %] [% UNLESS no_edit_other_link %] Edit other values for the '[% field.description FILTER html %]' field. + [%- field.name FILTER uri %]">'[% field.description FILTER html %]' field. [% END %] diff --git a/template/en/default/admin/fieldvalues/list.html.tmpl b/template/en/default/admin/fieldvalues/list.html.tmpl index 3f750ebca..2b6aedb6f 100644 --- a/template/en/default/admin/fieldvalues/list.html.tmpl +++ b/template/en/default/admin/fieldvalues/list.html.tmpl @@ -35,9 +35,9 @@ %] [% edit_contentlink = BLOCK %]editvalues.cgi?action=edit&field= - [%- field.name FILTER url_quote %]&value=%%name%%[% END %] + [%- field.name FILTER uri %]&value=%%name%%[% END %] [% delete_contentlink = BLOCK %]editvalues.cgi?action=del&field= - [%- field.name FILTER url_quote %]&value=%%name%%[% END %] + [%- field.name FILTER uri %]&value=%%name%%[% END %] [% columns = [ diff --git a/template/en/default/admin/groups/delete.html.tmpl b/template/en/default/admin/groups/delete.html.tmpl index 9d32da4de..b93c84b25 100644 --- a/template/en/default/admin/groups/delete.html.tmpl +++ b/template/en/default/admin/groups/delete.html.tmpl @@ -55,7 +55,7 @@ users in it.
    Show + [%- group.id FILTER uri %]&grouprestrict=1">Show me which users -

    [% END %] @@ -75,7 +75,7 @@ [%+ terms.bugs %] are using it.
    Show me + [%- group.name FILTER uri %]">Show me which [% terms.bugs %] -

    @@ -119,7 +119,7 @@ [% END %]
  • + [%- data.product.name FILTER uri %]"> [%- data.product.name FILTER html %] ([% active.join(', ') FILTER html %]) [% IF hidden %] @@ -139,7 +139,7 @@ You cannot delete this group while there are flag types using it.
    Show + [%- group.id FILTER uri %]">Show me which types -

    diff --git a/template/en/default/admin/keywords/edit.html.tmpl b/template/en/default/admin/keywords/edit.html.tmpl index c4b9a64d7..65a62290b 100644 --- a/template/en/default/admin/keywords/edit.html.tmpl +++ b/template/en/default/admin/keywords/edit.html.tmpl @@ -53,7 +53,7 @@ [% terms.Bugs %]: [% IF keyword.bug_count > 0 %] - + [% keyword.bug_count FILTER html %] [% ELSE %] none diff --git a/template/en/default/admin/milestones/confirm-delete.html.tmpl b/template/en/default/admin/milestones/confirm-delete.html.tmpl index ea89b8021..068e8e254 100644 --- a/template/en/default/admin/milestones/confirm-delete.html.tmpl +++ b/template/en/default/admin/milestones/confirm-delete.html.tmpl @@ -52,8 +52,8 @@ [% IF milestone.bug_count %] + href="buglist.cgi?target_milestone=[% milestone.name FILTER uri %]&product= + [%- product.name FILTER uri %]"> [% milestone.bug_count FILTER none %] [% ELSE %] None diff --git a/template/en/default/admin/milestones/footer.html.tmpl b/template/en/default/admin/milestones/footer.html.tmpl index e91e5f9ad..1cae69e17 100644 --- a/template/en/default/admin/milestones/footer.html.tmpl +++ b/template/en/default/admin/milestones/footer.html.tmpl @@ -40,7 +40,7 @@ [% UNLESS no_add_milestone_link %] Add a milestone. + [%- product.name FILTER uri %]">Add a milestone. [% END %] [% IF milestone.name && !no_edit_milestone_link %] @@ -48,20 +48,20 @@ title="Edit Milestone '[% milestone.name FILTER html %]' of product ' [%- product.name FILTER html %]'" href="editmilestones.cgi?action=edit&product= - [%- product.name FILTER url_quote %]&milestone= - [%- milestone.name FILTER url_quote %]"> + [%- product.name FILTER uri %]&milestone= + [%- milestone.name FILTER uri %]"> '[% milestone.name FILTER html %]'. [% END %] [% UNLESS no_edit_other_milestones_link %] Edit other milestones of product '[% product.name FILTER html %]'. + [%- product.name FILTER uri %]">'[% product.name FILTER html %]'. [% END %] Edit product '[% product.name FILTER html %]'. + [%- product.name FILTER uri %]">'[% product.name FILTER html %]'.

    diff --git a/template/en/default/admin/milestones/list.html.tmpl b/template/en/default/admin/milestones/list.html.tmpl index 9422855ac..56f621e1e 100644 --- a/template/en/default/admin/milestones/list.html.tmpl +++ b/template/en/default/admin/milestones/list.html.tmpl @@ -37,11 +37,11 @@ %] [% edit_contentlink = BLOCK %]editmilestones.cgi?action=edit&product= - [%- product.name FILTER url_quote %]&milestone=%%name%%[% END %] + [%- product.name FILTER uri %]&milestone=%%name%%[% END %] [% delete_contentlink = BLOCK %]editmilestones.cgi?action=del&product= - [%- product.name FILTER url_quote %]&milestone=%%name%%[% END %] + [%- product.name FILTER uri %]&milestone=%%name%%[% END %] [% bug_count_contentlink = BLOCK %]buglist.cgi?target_milestone=%%name%%&product= - [%- product.name FILTER url_quote %][% END %] + [%- product.name FILTER uri %][% END %] [% columns = [ @@ -96,7 +96,7 @@ [% IF ! showbugcounts %] -

    +

    Redisplay table with [% terms.bug %] counts (slower)

    [% END %] diff --git a/template/en/default/admin/params/editparams.html.tmpl b/template/en/default/admin/params/editparams.html.tmpl index 21fa9fa41..77d843da2 100644 --- a/template/en/default/admin/params/editparams.html.tmpl +++ b/template/en/default/admin/params/editparams.html.tmpl @@ -78,7 +78,7 @@ [% ELSE %] - [% panel.title FILTER html %] [% END %] diff --git a/template/en/default/admin/params/index.html.tmpl b/template/en/default/admin/params/index.html.tmpl index 9f8024528..de6a56f2e 100644 --- a/template/en/default/admin/params/index.html.tmpl +++ b/template/en/default/admin/params/index.html.tmpl @@ -35,7 +35,7 @@ + [%- panel.name FILTER uri %]#[% param.name FILTER uri %]_desc"> [% param.name FILTER html %] diff --git a/template/en/default/admin/products/confirm-delete.html.tmpl b/template/en/default/admin/products/confirm-delete.html.tmpl index f4a04b86f..aa728df75 100644 --- a/template/en/default/admin/products/confirm-delete.html.tmpl +++ b/template/en/default/admin/products/confirm-delete.html.tmpl @@ -58,7 +58,7 @@ Product: - + [% product.name FILTER html %] @@ -104,7 +104,7 @@ [% IF product.components.size > 0 %] - Components: @@ -138,7 +138,7 @@ [% IF product.versions.size > 0 %] - + Versions: [% ELSE %] @@ -161,7 +161,7 @@ [% IF product.milestones.size > 0 %] - + Milestones: [% ELSE %] @@ -184,7 +184,7 @@ [% terms.Bugs %]: [% IF product.bug_count %] - [% product.bug_count FILTER html %] diff --git a/template/en/default/admin/products/edit.html.tmpl b/template/en/default/admin/products/edit.html.tmpl index 976739f78..bb55f4eb0 100644 --- a/template/en/default/admin/products/edit.html.tmpl +++ b/template/en/default/admin/products/edit.html.tmpl @@ -45,7 +45,7 @@ - + Edit components: @@ -67,7 +67,7 @@ - Edit + Edit versions: @@ -84,7 +84,7 @@ versions: [% IF Param('usetargetmilestone') %] - + Edit milestones: @@ -102,7 +102,7 @@ versions: + [%- product.name FILTER uri %]"> Edit Group Access Controls: @@ -130,7 +130,7 @@ versions: [% terms.Bugs %]: - + [% product.bug_count FILTER html %] diff --git a/template/en/default/admin/products/footer.html.tmpl b/template/en/default/admin/products/footer.html.tmpl index 661829b7c..78e1864a7 100644 --- a/template/en/default/admin/products/footer.html.tmpl +++ b/template/en/default/admin/products/footer.html.tmpl @@ -30,10 +30,10 @@ [% IF Param('useclassification') && classification %] [% classification_url_part = BLOCK %]&classification= - [%- classification.name FILTER url_quote %] + [%- classification.name FILTER uri %] [% END %] [% classification_url_part_start = BLOCK %]classification= - [%- classification.name FILTER url_quote %] + [%- classification.name FILTER uri %] [% END %] [% classification_text = BLOCK %] of classification '[% classification.name FILTER html %]' @@ -61,7 +61,7 @@ Edit product + href="editproducts.cgi?action=edit&product=[% product.name FILTER uri %]"> '[% product.name FILTER html %]'. [% END %] diff --git a/template/en/default/admin/products/list.html.tmpl b/template/en/default/admin/products/list.html.tmpl index 13f12780a..a9951dd74 100644 --- a/template/en/default/admin/products/list.html.tmpl +++ b/template/en/default/admin/products/list.html.tmpl @@ -26,7 +26,7 @@ [% IF classification %] [% classification_url_part = BLOCK %]&classification= - [%- classification.name FILTER url_quote %] + [%- classification.name FILTER uri %] [%- END %] [% classification_title = BLOCK %] in classification '[% classification.name FILTER html %]' diff --git a/template/en/default/admin/products/updated.html.tmpl b/template/en/default/admin/products/updated.html.tmpl index 4140bab62..d93022a6e 100644 --- a/template/en/default/admin/products/updated.html.tmpl +++ b/template/en/default/admin/products/updated.html.tmpl @@ -45,7 +45,7 @@

    Updated product name from '[% changes.name.0 FILTER html %]' to '[% product.name FILTER html %]'. + [%- product.name FILTER uri %]">[% product.name FILTER html %]'.

    [% END %] @@ -86,7 +86,7 @@ [%+ display_value('bug_status', 'UNCONFIRMED') FILTER html %] status. Note that any + [%- product.name FILTER uri %]&bug_status=UNCONFIRMED"> [%- terms.bugs %] that currently have the [%+ display_value('bug_status', 'UNCONFIRMED') FILTER html %] status will remain in that status until they are edited. diff --git a/template/en/default/admin/sanitycheck/messages.html.tmpl b/template/en/default/admin/sanitycheck/messages.html.tmpl index 5c2b2feb1..af0f9e572 100644 --- a/template/en/default/admin/sanitycheck/messages.html.tmpl +++ b/template/en/default/admin/sanitycheck/messages.html.tmpl @@ -34,7 +34,7 @@ [% errortext FILTER html %]: [% INCLUDE bug_list badbugs = badbugs %] [% ELSIF san_tag == "bug_check_repair" %] - [% text FILTER html %]. + [% text FILTER html %]. [% ELSIF san_tag == "bug_check_creation_date" %] Checking for [% terms.bugs %] with no creation date (which makes them invisible). @@ -299,12 +299,12 @@ # which itself calls this template again, generating a recursion error. # I doubt having a tooltip with the bug status and summary is so # important here anyway, as you can click the "(as buglist)" link. %] - [% bug_id FILTER html %] + [% bug_id FILTER html %] [% ", " IF !loop.last %] [% END %] - (as [% terms.bug %] list). + (as [% terms.bug %] list). [% END %] [% BLOCK bug_link %] - [% terms.bug %] [%+ bug_id FILTER html %] + [% terms.bug %] [%+ bug_id FILTER html %] [% END %] diff --git a/template/en/default/admin/table.html.tmpl b/template/en/default/admin/table.html.tmpl index ce5e985cb..706e7d75a 100644 --- a/template/en/default/admin/table.html.tmpl +++ b/template/en/default/admin/table.html.tmpl @@ -144,7 +144,7 @@ [% WHILE link_uri.search('%%(.+?)%%')%] [% FOREACH m = link_uri.match('%%(.+?)%%') %] [% IF row.$m %] - [% replacement_value = FILTER url_quote; row.$m; END %] + [% replacement_value = FILTER uri; row.$m; END %] [% ELSE %] [% replacement_value = "" %] [% END %] diff --git a/template/en/default/admin/users/confirm-delete.html.tmpl b/template/en/default/admin/users/confirm-delete.html.tmpl index 4711376b0..1e7077eaf 100644 --- a/template/en/default/admin/users/confirm-delete.html.tmpl +++ b/template/en/default/admin/users/confirm-delete.html.tmpl @@ -112,7 +112,7 @@
  • [% otheruser.login FILTER html %] has submitted + [%- otheruser.login FILTER uri %]">has submitted [% IF attachments == 1 %] one attachment [% ELSE %] @@ -132,7 +132,7 @@
  • [% otheruser.login FILTER html %] has reported + [%- otheruser.login FILTER uri %]">has reported [% IF reporter == 1 %] one [% terms.bug %] [% ELSE %] @@ -170,7 +170,7 @@
  • [% otheruser.login FILTER html %] has set + [%- otheruser.login FILTER uri %]">set or requested [% IF flags.setter == 1 %] a flag @@ -191,7 +191,7 @@
  • [% otheruser.login FILTER html %] has commented + [%- otheruser.login FILTER uri %]">commented [% IF longdescs == 1 %] once on [% terms.abug %] [% ELSE %] @@ -236,7 +236,7 @@
  • [% otheruser.login FILTER html %] is + [%- otheruser.login FILTER uri %]">is the assignee or the QA contact of [% IF assignee_or_qa == 1 %] one [% terms.bug %] @@ -251,7 +251,7 @@
  • [% otheruser.login FILTER html %] is + [%- otheruser.login FILTER uri %]">is on the CC list of [% IF cc == 1 %] [%+ terms.abug %] @@ -282,7 +282,7 @@
  • [% otheruser.login FILTER html %] has been asked + [%- otheruser.login FILTER uri %]">asked to set [% IF flags.requestee == 1 %] a flag diff --git a/template/en/default/admin/users/listselectvars.html.tmpl b/template/en/default/admin/users/listselectvars.html.tmpl index a6eae5791..a2be91d7a 100644 --- a/template/en/default/admin/users/listselectvars.html.tmpl +++ b/template/en/default/admin/users/listselectvars.html.tmpl @@ -20,8 +20,8 @@ [% BLOCK listselectionurlparams %] [% FOREACH field = listselectionvalues.keys %]& - [% field FILTER url_quote %]= - [% listselectionvalues.$field FILTER url_quote %] + [% field FILTER uri %]= + [% listselectionvalues.$field FILTER uri %] [% END %] [% END %] diff --git a/template/en/default/admin/users/responsibilities.html.tmpl b/template/en/default/admin/users/responsibilities.html.tmpl index 5c9c3f317..1e11f8000 100644 --- a/template/en/default/admin/users/responsibilities.html.tmpl +++ b/template/en/default/admin/users/responsibilities.html.tmpl @@ -36,8 +36,8 @@ [% IF user.in_group("editcomponents", component.product_id) %] + [% item.product.name FILTER uri %]&component= + [% component.name FILTER uri %]"> [% END %] [% component.name FILTER html %] [% IF user.in_group("editcomponents", component.product_id) %] diff --git a/template/en/default/admin/users/userdata.html.tmpl b/template/en/default/admin/users/userdata.html.tmpl index f23aa1b85..d81529b48 100644 --- a/template/en/default/admin/users/userdata.html.tmpl +++ b/template/en/default/admin/users/userdata.html.tmpl @@ -30,7 +30,7 @@ [% IF !otheruser.in_group('bz_sudo_protect') %]
    Impersonate this user + [%- otheruser.login FILTER uri %]">Impersonate this user [% END %] [% END %] [% ELSE %] diff --git a/template/en/default/admin/versions/confirm-delete.html.tmpl b/template/en/default/admin/versions/confirm-delete.html.tmpl index 88ffceb31..39091d5fc 100644 --- a/template/en/default/admin/versions/confirm-delete.html.tmpl +++ b/template/en/default/admin/versions/confirm-delete.html.tmpl @@ -52,8 +52,8 @@ [% IF version.bug_count %] + href="buglist.cgi?version=[% version.name FILTER uri %]&product= + [%- product.name FILTER uri %]"> [%- version.bug_count FILTER none %] [% ELSE %] None diff --git a/template/en/default/admin/versions/footer.html.tmpl b/template/en/default/admin/versions/footer.html.tmpl index 8d96a12e9..ae26e5744 100644 --- a/template/en/default/admin/versions/footer.html.tmpl +++ b/template/en/default/admin/versions/footer.html.tmpl @@ -38,7 +38,7 @@ [% UNLESS no_add_version_link %] Add a version. + [%- product.name FILTER uri %]">Add a version. [% END %] [% IF version.name && !no_edit_version_link %] @@ -46,20 +46,20 @@ title="Edit Version '[% version.name FILTER html %]' of product ' [%- product.name FILTER html %]'" href="editversions.cgi?action=edit&product= - [%- product.name FILTER url_quote %]&version= - [%- version.name FILTER url_quote %]"> + [%- product.name FILTER uri %]&version= + [%- version.name FILTER uri %]"> '[% version.name FILTER html %]'. [% END %] [% UNLESS no_edit_other_versions_link %] Edit other versions of product '[% product.name FILTER html %]'. + [%- product.name FILTER uri %]">'[% product.name FILTER html %]'. [% END %] Edit product '[% product.name FILTER html %]'. + [%- product.name FILTER uri %]">'[% product.name FILTER html %]'.

    diff --git a/template/en/default/admin/versions/list.html.tmpl b/template/en/default/admin/versions/list.html.tmpl index 401ee519b..ae21bbf5c 100644 --- a/template/en/default/admin/versions/list.html.tmpl +++ b/template/en/default/admin/versions/list.html.tmpl @@ -33,11 +33,11 @@ %] [% edit_contentlink = BLOCK %]editversions.cgi?action=edit&product= - [%- product.name FILTER url_quote %]&version=%%name%%[% END %] + [%- product.name FILTER uri %]&version=%%name%%[% END %] [% delete_contentlink = BLOCK %]editversions.cgi?action=del&product= - [%- product.name FILTER url_quote %]&version=%%name%%[% END %] + [%- product.name FILTER uri %]&version=%%name%%[% END %] [% bug_count_contentlink = BLOCK %]buglist.cgi?version=%%name%%&product= - [%- product.name FILTER url_quote %][% END %] + [%- product.name FILTER uri %][% END %] [% columns = [ @@ -77,7 +77,7 @@ [% IF ! showbugcounts %] -

    +

    Redisplay table with [% terms.bug %] counts (slower)

    [% END %] diff --git a/template/en/default/attachment/cancel-create-dupe.html.tmpl b/template/en/default/attachment/cancel-create-dupe.html.tmpl index f838955bc..643a24ad8 100644 --- a/template/en/default/attachment/cancel-create-dupe.html.tmpl +++ b/template/en/default/attachment/cancel-create-dupe.html.tmpl @@ -34,14 +34,14 @@ You already used the form to file - attachment [% attachid FILTER url_quote %]. + attachment [% attachid FILTER uri %].

    - You can either + You can either create a new attachment or [% "go back to $terms.bug $bugid" FILTER bug_link(bugid) FILTER none %].

    diff --git a/template/en/default/attachment/diff-header.html.tmpl b/template/en/default/attachment/diff-header.html.tmpl index 30b8e98e9..650d90f73 100644 --- a/template/en/default/attachment/diff-header.html.tmpl +++ b/template/en/default/attachment/diff-header.html.tmpl @@ -69,7 +69,7 @@ Interdiff of #[% oldid %] and #[% newid %] for [% terms.bug %] #[% bugid %] [% IF headers %] View | Details - | Raw Unified + | Raw Unified | Return to [% "$terms.bug $bugid" FILTER bug_link(bugid) FILTER none %] [% END %] [% IF other_patches.size > 0 %] @@ -115,12 +115,12 @@ Interdiff of #[% oldid %] and #[% newid %] for [% terms.bug %] #[% bugid %] [% IF context == "patch" %] (Patch / [% ELSE %] - (Patch / + (Patch / [% END %] [% IF context == "file" %] File / [% ELSE %] - File / + File / [% END %] [% IF context == "patch" || context == "file" %] diff --git a/template/en/default/bug/create/create-guided.html.tmpl b/template/en/default/bug/create/create-guided.html.tmpl index 86bdb8621..93cd18a77 100644 --- a/template/en/default/bug/create/create-guided.html.tmpl +++ b/template/en/default/bug/create/create-guided.html.tmpl @@ -82,7 +82,7 @@ function PutDescription() { [% ELSIF product.name == "Thunderbird" %] [% productstring = "product=Mozilla%20Application%20Suite&product=Thunderbird" %] [% ELSE %] - [% productstring = BLOCK %]product=[% product.name FILTER url_quote %][% END %] + [% productstring = BLOCK %]product=[% product.name FILTER uri %][% END %] [% END %]

    @@ -205,7 +205,7 @@ function PutDescription() { To pick the right component, you could use the same one as similar [% terms.bugs %] you found in your search, or read the full list of component + [% product.name FILTER uri %]">component descriptions (opens in new window) if you need more help.

    diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index 425d82343..f79249946 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -221,7 +221,7 @@ TUI_hide_default('attachment_text_field'); [%# We can't use the select block in these two cases for various reasons. %] [% component_desc_url = BLOCK -%] - describecomponents.cgi?product=[% product.name FILTER url_quote %] + describecomponents.cgi?product=[% product.name FILTER uri %] [% END %] [% INCLUDE "bug/field-label.html.tmpl" field = bug_fields.component editable = 1 diff --git a/template/en/default/bug/dependency-tree.html.tmpl b/template/en/default/bug/dependency-tree.html.tmpl index 627c89d60..6ae183f1f 100644 --- a/template/en/default/bug/dependency-tree.html.tmpl +++ b/template/en/default/bug/dependency-tree.html.tmpl @@ -144,7 +144,7 @@ [%+ bug.short_desc FILTER html %] [[% INCLUDE buginfo %]] - diff --git a/template/en/default/bug/field-label.html.tmpl b/template/en/default/bug/field-label.html.tmpl index 0b794f82a..a47855e14 100644 --- a/template/en/default/bug/field-label.html.tmpl +++ b/template/en/default/bug/field-label.html.tmpl @@ -45,7 +45,7 @@ [% IF desc_url %] href="[% desc_url FILTER html %]" [% ELSE %] - href="page.cgi?id=fields.html#[% field.name FILTER url_quote %]" + href="page.cgi?id=fields.html#[% field.name FILTER uri %]" [% END %] >[%- field_descs.${field.name} FILTER html %]: diff --git a/template/en/default/bug/navigate.html.tmpl b/template/en/default/bug/navigate.html.tmpl index 19af18ade..46b92aec4 100644 --- a/template/en/default/bug/navigate.html.tmpl +++ b/template/en/default/bug/navigate.html.tmpl @@ -25,11 +25,11 @@ [% IF bottom_navigator == 1 %]