Ox.decodeURI/Ox.decodeURIComponent: handle multi-byte escapes
This commit is contained in:
parent
b0280295d2
commit
c5a8d7a79e
1 changed files with 2 additions and 2 deletions
|
@ -30,7 +30,7 @@ Ox.decodeURIComponent <f> Decodes URI
|
||||||
(string) -> <s> Decoded string
|
(string) -> <s> Decoded string
|
||||||
@*/
|
@*/
|
||||||
Ox.decodeURI = function(string) {
|
Ox.decodeURI = function(string) {
|
||||||
return decodeURIComponent(string.replace(/%(?![0-7][0-9A-F])/g, '%25'));
|
return decodeURIComponent(string.replace(/%(?![0-9A-F]{2})/g, '%25'));
|
||||||
};
|
};
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
|
@ -39,7 +39,7 @@ Ox.decodeURIComponent <f> Decodes URI component
|
||||||
(string) -> <s> Decoded string
|
(string) -> <s> Decoded string
|
||||||
@*/
|
@*/
|
||||||
Ox.decodeURIComponent = function(string) {
|
Ox.decodeURIComponent = function(string) {
|
||||||
return decodeURIComponent(string.replace(/%(?![0-7][0-9A-F])/g, '%25'));
|
return decodeURIComponent(string.replace(/%(?![0-9A-F]{2})/g, '%25'));
|
||||||
};
|
};
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
|
|
Loading…
Reference in a new issue