From 0829cb340391ad16a3cb70fc6084508620a0d60f Mon Sep 17 00:00:00 2001 From: renato <renato@rezo.net> Date: Fri, 7 Dec 2007 21:29:29 +0000 Subject: [PATCH] essaye a decoder les URL pas en UTF-8 --- dist/javascript/SearchHighlight.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dist/javascript/SearchHighlight.js b/dist/javascript/SearchHighlight.js index 86b8ea2afd..9d14ce18b4 100644 --- a/dist/javascript/SearchHighlight.js +++ b/dist/javascript/SearchHighlight.js @@ -79,7 +79,12 @@ ], subs: {}, decodeURL: function(URL,reg) { - URL = decodeURIComponent(URL); + //try to properly escape not UTF-8 URI encoded chars + try { + URL = decodeURIComponent(URL); + } catch (e) { + URL = unescape(URL); + } var query = null; $.each(reg,function(i,n){ if(n[0].test(URL)) { -- GitLab