Use uri_escape_utf8 instead of uri_escape
authorPasi Kallinen <pasi.kallinen@pttk.fi>
Fri, 28 Jun 2013 06:44:44 +0000 (09:44 +0300)
committerBen Shum <bshum@biblio.org>
Fri, 16 Aug 2013 04:09:37 +0000 (00:09 -0400)
Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm

index 244afa2..210a3c0 100644 (file)
@@ -216,7 +216,7 @@ sub redirect_ssl {
 sub redirect_auth {
     my $self = shift;
     my $login_page = sprintf('%s://%s%s/login',($self->ctx->{is_staff} ? 'oils' : 'https'), $self->ctx->{hostname}, $self->ctx->{opac_root});
-    my $redirect_to = uri_escape($self->apache->unparsed_uri);
+    my $redirect_to = uri_escape_utf8($self->apache->unparsed_uri);
     return $self->generic_redirect("$login_page?redirect_to=$redirect_to");
 }
 
index ca917a9..381028d 100644 (file)
@@ -603,7 +603,7 @@ sub handle_hold_update {
         $url = $self->ctx->{proto} . '://' . $self->ctx->{hostname} . $self->ctx->{opac_root} . '/myopac/holds';
         foreach my $param (('loc', 'qtype', 'query')) {
             if ($self->cgi->param($param)) {
-                $url .= ";$param=" . uri_escape($self->cgi->param($param));
+                $url .= ";$param=" . uri_escape_utf8($self->cgi->param($param));
             }
         }
     }
@@ -1749,7 +1749,7 @@ sub load_myopac_bookbags {
 
                     foreach my $param (('loc', 'qtype', 'query', 'sort', 'offset', 'limit')) {
                         if ($self->cgi->param($param)) {
-                            $url .= ";$param=" . uri_escape($self->cgi->param($param));
+                            $url .= ";$param=" . uri_escape_utf8($self->cgi->param($param));
                         }
                     }
 
@@ -1851,7 +1851,7 @@ sub load_myopac_bookbag_update {
 
     foreach my $param (('loc', 'qtype', 'query', 'sort')) {
         if ($cgi->param($param)) {
-            $url .= "$param=" . uri_escape($cgi->param($param)) . ";";
+            $url .= "$param=" . uri_escape_utf8($cgi->param($param)) . ";";
         }
     }
 
@@ -1893,7 +1893,7 @@ sub load_myopac_bookbag_update {
         $url .= ';hold_target=' . $_ for @hold_recs;
         foreach my $param (('loc', 'qtype', 'query')) {
             if ($cgi->param($param)) {
-                $url .= ";$param=" . uri_escape($cgi->param($param));
+                $url .= ";$param=" . uri_escape_utf8($cgi->param($param));
             }
         }
         return $self->generic_redirect($url);
@@ -1972,7 +1972,7 @@ sub load_myopac_bookbag_update {
         }
     } elsif ($action eq 'save_notes') {
         $success = $self->update_bookbag_item_notes;
-        $url .= "&bbid=" . uri_escape($cgi->param("bbid")) if $cgi->param("bbid");
+        $url .= "&bbid=" . uri_escape_utf8($cgi->param("bbid")) if $cgi->param("bbid");
     } elsif ($action eq 'make_default') {
         $success = $U->simplereq(
             'open-ils.actor',
index b61ac06..df7b79f 100644 (file)
@@ -204,7 +204,7 @@ sub mylist_warning_redirect {
         $redirect =~ s/#.*|$/#$anchor/;
     }
 
-    $base_url .= '?redirect_to=' . uri_escape($redirect);
+    $base_url .= '?redirect_to=' . uri_escape_utf8($redirect);
 
     return $self->generic_redirect(
         $base_url,