From 5afbd578231e0c3b228a16e9ffb98a48a2872f30 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Wed, 14 Aug 2013 19:26:14 +0000 Subject: [PATCH] Ox.URL: encode ' ' as '_' and '_' as '%09' (tab) --- source/Ox.UI/js/Core/URL.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Ox.UI/js/Core/URL.js b/source/Ox.UI/js/Core/URL.js index 97e4fe77..a9662da5 100644 --- a/source/Ox.UI/js/Core/URL.js +++ b/source/Ox.UI/js/Core/URL.js @@ -563,7 +563,7 @@ Ox.URL = function(options) { } function decodeValue(value) { - return Ox.decodeURIComponent(value); + return Ox.decodeURIComponent(value).replace(/_/g, ' ').replace(Ox.char(9), '_'); } function encodeValue(value) { @@ -576,7 +576,7 @@ Ox.URL = function(options) { ? '%' + char.charCodeAt(0).toString(16).toUpperCase() : char; }); - return ret; + return ret.replace(/_/g, '%09').replace(/\s/g, '_'); } function isNumericalSpan(str) {