[facets] use encodeURIComponent instead of escape to encode url paremters (closes #1984727)

authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
changesetece4bc9b9314
branchstable
phasepublic
hiddenno
parent revision#d307c3817782 [repository] use utcnow instead of now for some internal timetamps (closes #1988458)
child revision#249bd4169339 3.13.8
files modified by this revision
web/data/cubicweb.facets.js
# HG changeset patch
# User Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
# Date 1317995749 -7200
# Fri Oct 07 15:55:49 2011 +0200
# Branch stable
# Node ID ece4bc9b9314634cc9c08bc7bf4d2ac829404794
# Parent d307c381778280d3fedd67152df860551346142a
[facets] use encodeURIComponent instead of escape to encode url paremters (closes #1984727)

diff --git a/web/data/cubicweb.facets.js b/web/data/cubicweb.facets.js
@@ -58,15 +58,15 @@
1      var d = loadRemote('json', ajaxFuncArgs('filter_build_rql', null, zipped[0], zipped[1]));
2      d.addCallback(function(result) {
3          var rql = result[0];
4          var $bkLink = jQuery('#facetBkLink');
5          if ($bkLink.length) {
6 -            var bkPath = 'view?rql=' + escape(rql);
7 +            var bkPath = 'view?rql=' + encodeURIComponent(rql);
8              if (vid) {
9 -                bkPath += '&vid=' + escape(vid);
10 +                bkPath += '&vid=' + encodeURIComponent(vid);
11              }
12 -            var bkUrl = $bkLink.attr('cubicweb:target') + '&path=' + escape(bkPath);
13 +            var bkUrl = $bkLink.attr('cubicweb:target') + '&path=' + encodeURIComponent(bkPath);
14              $bkLink.attr('href', bkUrl);
15          }
16          var toupdate = result[1];
17          var extraparams = vidargs;
18          if (paginate) { extraparams['paginate'] = '1'; } // XXX in vidargs