From c7e25dc5282cb2beffe3a35cd8dec47cd5c34175 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Tue, 27 Aug 2013 15:12:19 +0000 Subject: [PATCH] Ox.URL: encode/decode '<' and '>' (fixes #1837) --- source/Ox.UI/js/Core/URL.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/Ox.UI/js/Core/URL.js b/source/Ox.UI/js/Core/URL.js index f4a896fa..3195d695 100644 --- a/source/Ox.UI/js/Core/URL.js +++ b/source/Ox.UI/js/Core/URL.js @@ -563,7 +563,9 @@ Ox.URL = function(options) { } function decodeValue(value) { - return Ox.decodeURIComponent(value).replace(/_/g, ' ').replace(/\t/g, '_'); + return Ox.decodeURIComponent(value) + .replace(/_/g, ' ').replace(/\t/g, '_') + .replace(/\x0E/g, '<').replace(/\x0F/g, '>'); } function encodeValue(value, isItem) { @@ -575,7 +577,11 @@ Ox.URL = function(options) { ? '%' + char.charCodeAt(0).toString(16).toUpperCase() : char; }); - return ret.replace(/_/g, '%09').replace(/\s/g, '_'); + ret = ret.replace(/_/g, '%09').replace(/\s/g, '_'); + if (!isItem) { + ret = ret.replace(//g, '%0F'); + } + return ret; } function isNumericalSpan(str) {