From ccbb9eef0e2d10aa46cf09a077bae904de8a39db Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Tue, 3 May 2011 17:08:59 -0400 Subject: [PATCH] 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 --- Open-ILS/web/templates/default/opac/parts/header.tt2 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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; %] -- 2.11.0