From 3fec6952ddbff1b5b487ea2927928338f39e4fef Mon Sep 17 00:00:00 2001 From: alecpl Date: Tue, 15 Nov 2011 10:50:30 +0000 Subject: - Applied fixes from trunk up to r5425 --- program/js/common.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'program/js') diff --git a/program/js/common.js b/program/js/common.js index 831e44a21..c13d95e3d 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -542,10 +542,17 @@ function rcube_clone_object(obj) return out; }; -// make a string URL safe +// make a string URL safe (and compatible with PHP's rawurlencode()) function urlencode(str) { - return window.encodeURIComponent ? encodeURIComponent(str) : escape(str); + if (window.encodeURIComponent) + return encodeURIComponent(str).replace('*', '%2A'); + + return escape(str) + .replace('+', '%2B') + .replace('*', '%2A') + .replace('/', '%2F') + .replace('@', '%40'); }; -- cgit v1.2.3