[facets] use encodeURIComponent instead of escape to encode url paremters (closes #1984727)
--- 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];