fix(http): encode correct value for %3D (#9790)
This commit is contained in:
parent
6c77d7182a
commit
75553200c0
|
@ -41,7 +41,7 @@ function standardEncoding(v: string): string {
|
|||
.replace(/%2C/gi, ',')
|
||||
.replace(/%3B/gi, ';')
|
||||
.replace(/%2B/gi, '+')
|
||||
.replace(/%3D/gi, ';')
|
||||
.replace(/%3D/gi, '=')
|
||||
.replace(/%3F/gi, '?')
|
||||
.replace(/%2F/gi, '/');
|
||||
}
|
||||
|
|
|
@ -68,11 +68,11 @@ export function main() {
|
|||
**/
|
||||
|
||||
let params = new URLSearchParams();
|
||||
'! $ \' ( ) * + , ; A 9 - . _ ~ ? /'.split(' ').forEach(
|
||||
'! $ \' ( ) * + , ; A 9 - . _ ~ ? / ='.split(' ').forEach(
|
||||
(char, idx) => { params.set(`a${idx}`, char); });
|
||||
expect(params.toString())
|
||||
.toBe(
|
||||
`a0=!&a1=$&a2=\'&a3=(&a4=)&a5=*&a6=+&a7=,&a8=;&a9=A&a10=9&a11=-&a12=.&a13=_&a14=~&a15=?&a16=/`
|
||||
`a0=!&a1=$&a2=\'&a3=(&a4=)&a5=*&a6=+&a7=,&a8=;&a9=A&a10=9&a11=-&a12=.&a13=_&a14=~&a15=?&a16=/&a17==`
|
||||
.replace(/\s/g, ''));
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue