diff options
author | alecpl <alec@alec.pl> | 2011-11-15 10:50:30 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-11-15 10:50:30 +0000 |
commit | 3fec6952ddbff1b5b487ea2927928338f39e4fef (patch) | |
tree | c684fe925e092fd78e1a2048eab4357bce7aacee /program/js | |
parent | ecfaed571b2c38f4bcc2b6a0fa39fba15a5126ce (diff) |
- Applied fixes from trunk up to r5425
Diffstat (limited to 'program/js')
-rw-r--r-- | program/js/common.js | 11 |
1 files changed, 9 insertions, 2 deletions
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'); }; |