From: Dan Scott Date: Tue, 3 May 2011 21:08:59 +0000 (-0400) Subject: Less aggressive URL encoding X-Git-Tag: sprint4-merge-nov22~5128^2~72^2~60^2~1^2~3 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ccbb9eef0e2d10aa46cf09a077bae904de8a39db;p=working%2FEvergreen.git Less aggressive URL encoding We were double-encoding URIs, as the url and uri filters in TT happily encode % - which is fine the first time around, but after you've already escaped everything as %nn the propagator was serving it back to url to be escaped again on the following page request. The right way to do this might be to unescape the incoming query string, then pass it on to url for escaping again - but for now, using the entity version of & is good enough to begin with. Signed-off-by: Dan Scott --- diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2 index 4c68368f24..114b4c3494 100644 --- a/Open-ILS/web/templates/default/opac/parts/header.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/header.tt2 @@ -15,10 +15,9 @@ query_string = CGI.query_string | replace(';x=\d+','') | replace(';y=\d+','') | replace(';page=\d*', '') | - replace(';', '&'); + replace(';', '&') | replace('&', '&'); - - propagator = '?' _ query_string | url | replace('&', '&'); + propagator = '?' _ query_string; is_advanced = CGI.param("_adv").size; %]