[facets] use encodeURIComponent instead of escape to encode url paremters (closes #1984727) stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Fri, 07 Oct 2011 15:55:49 +0200
branchstable
changeset 7923 ece4bc9b9314
parent 7922 d307c3817782
child 7924 249bd4169339
[facets] use encodeURIComponent instead of escape to encode url paremters (closes #1984727)
web/data/cubicweb.facets.js
--- a/web/data/cubicweb.facets.js	Fri Oct 07 15:55:15 2011 +0200
+++ b/web/data/cubicweb.facets.js	Fri Oct 07 15:55:49 2011 +0200
@@ -60,11 +60,11 @@
         var rql = result[0];
         var $bkLink = jQuery('#facetBkLink');
         if ($bkLink.length) {
-            var bkPath = 'view?rql=' + escape(rql);
+            var bkPath = 'view?rql=' + encodeURIComponent(rql);
             if (vid) {
-                bkPath += '&vid=' + escape(vid);
+                bkPath += '&vid=' + encodeURIComponent(vid);
             }
-            var bkUrl = $bkLink.attr('cubicweb:target') + '&path=' + escape(bkPath);
+            var bkUrl = $bkLink.attr('cubicweb:target') + '&path=' + encodeURIComponent(bkPath);
             $bkLink.attr('href', bkUrl);
         }
         var toupdate = result[1];