From 6a2076402f45c08f728b596b006e70979bea48a7 Mon Sep 17 00:00:00 2001 From: Dan Briem Date: Sun, 9 May 2021 22:27:38 -0400 Subject: [PATCH] LP#1892435 Splash page catalog searches don't work with spaces On older versions of Apache's mod_rewrite, splash page catalog searches are escaped in JavaScript and escaped again during the redirect to the Angular locale path, so searches with special characters result in a search that's still encoded. Test on Ubuntu 16.04.7, Apache 2.4.18, EG 3.6+. A splash page catalog search for Harry Potter results in a search for Harry%20Potter. Add the NE (noescape) flag to the Angular locale path redirect in /etc/apache2/eg_vhost.conf as indicated in this example file. A splash page search for Harry Potter then works as expected. Signed-off-by: Dan Briem Signed-off-by: Jason Boyer --- Open-ILS/examples/apache_24/eg_vhost.conf.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/examples/apache_24/eg_vhost.conf.in b/Open-ILS/examples/apache_24/eg_vhost.conf.in index 53f411ddb5..a6d07e80ed 100644 --- a/Open-ILS/examples/apache_24/eg_vhost.conf.in +++ b/Open-ILS/examples/apache_24/eg_vhost.conf.in @@ -968,13 +968,13 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT] #RewriteCond %{REQUEST_URI} ^/eg2/ #RewriteCond %{REQUEST_URI} !^/eg2/fr-CA/ #RewriteCond %{HTTP_COOKIE} eg_locale=fr_ca -#RewriteRule ^/eg2/(.*) https://%{HTTP_HOST}/eg2/fr-CA/$1 [R=307,L] +#RewriteRule ^/eg2/(.*) https://%{HTTP_HOST}/eg2/fr-CA/$1 [NE,R=307,L] # Default / en-US. # No alternate supported cookie provided. RewriteCond %{REQUEST_URI} ^/eg2/ RewriteCond %{REQUEST_URI} !^/eg2/([a-z]{2}-[A-Z]{2})/ -RewriteRule ^/eg2/(.*) https://%{HTTP_HOST}/eg2/en-US/$1 [R=307,L] +RewriteRule ^/eg2/(.*) https://%{HTTP_HOST}/eg2/en-US/$1 [NE,R=307,L] # en-US build # This is the only required configuration when only using the default locale. -- 2.11.0