Revert "Don't escape [ and ] in query param keys (#2107)" (#2128)

This reverts commit ba9c12f2e0.
This commit is contained in:
Esteban Marin 2019-02-13 11:17:42 +01:00 committed by William Cheng
parent 550774a6e2
commit 804b589f5f
13 changed files with 14 additions and 42 deletions

View File

@ -14,9 +14,7 @@
export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec {
encodeKey(k: string): string {
k = super.encodeKey(k);
return k.replace(/\+/gi, '%2B')
.replace(/%5B/, "[").replace(/%5D/, "]")
;
return k.replace(/\+/gi, '%2B');
}
encodeValue(v: string): string {
v = super.encodeValue(v);
@ -33,9 +31,7 @@ export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec {
export class CustomQueryEncoderHelper extends QueryEncoder {
encodeKey(k: string): string {
k = super.encodeKey(k);
return k.replace(/\+/gi, '%2B')
.replace(/%5B/, "[").replace(/%5D/, "]")
;
return k.replace(/\+/gi, '%2B');
}
encodeValue(v: string): string {
v = super.encodeValue(v);

View File

@ -8,9 +8,7 @@
export class CustomQueryEncoderHelper extends QueryEncoder {
encodeKey(k: string): string {
k = super.encodeKey(k);
return k.replace(/\+/gi, '%2B')
.replace(/%5B/, "[").replace(/%5D/, "]")
;
return k.replace(/\+/gi, '%2B');
}
encodeValue(v: string): string {
v = super.encodeValue(v);

View File

@ -8,9 +8,7 @@
export class CustomQueryEncoderHelper extends QueryEncoder {
encodeKey(k: string): string {
k = super.encodeKey(k);
return k.replace(/\+/gi, '%2B')
.replace(/%5B/, "[").replace(/%5D/, "]")
;
return k.replace(/\+/gi, '%2B');
}
encodeValue(v: string): string {
v = super.encodeValue(v);

View File

@ -8,9 +8,7 @@
export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec {
encodeKey(k: string): string {
k = super.encodeKey(k);
return k.replace(/\+/gi, '%2B')
.replace(/%5B/, "[").replace(/%5D/, "]")
;
return k.replace(/\+/gi, '%2B');
}
encodeValue(v: string): string {
v = super.encodeValue(v);

View File

@ -8,9 +8,7 @@
export class CustomQueryEncoderHelper extends QueryEncoder {
encodeKey(k: string): string {
k = super.encodeKey(k);
return k.replace(/\+/gi, '%2B')
.replace(/%5B/, "[").replace(/%5D/, "]")
;
return k.replace(/\+/gi, '%2B');
}
encodeValue(v: string): string {
v = super.encodeValue(v);

View File

@ -8,9 +8,7 @@
export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec {
encodeKey(k: string): string {
k = super.encodeKey(k);
return k.replace(/\+/gi, '%2B')
.replace(/%5B/, "[").replace(/%5D/, "]")
;
return k.replace(/\+/gi, '%2B');
}
encodeValue(v: string): string {
v = super.encodeValue(v);

View File

@ -8,9 +8,7 @@
export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec {
encodeKey(k: string): string {
k = super.encodeKey(k);
return k.replace(/\+/gi, '%2B')
.replace(/%5B/, "[").replace(/%5D/, "]")
;
return k.replace(/\+/gi, '%2B');
}
encodeValue(v: string): string {
v = super.encodeValue(v);

View File

@ -8,9 +8,7 @@
export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec {
encodeKey(k: string): string {
k = super.encodeKey(k);
return k.replace(/\+/gi, '%2B')
.replace(/%5B/, "[").replace(/%5D/, "]")
;
return k.replace(/\+/gi, '%2B');
}
encodeValue(v: string): string {
v = super.encodeValue(v);

View File

@ -8,9 +8,7 @@
export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec {
encodeKey(k: string): string {
k = super.encodeKey(k);
return k.replace(/\+/gi, '%2B')
.replace(/%5B/, "[").replace(/%5D/, "]")
;
return k.replace(/\+/gi, '%2B');
}
encodeValue(v: string): string {
v = super.encodeValue(v);

View File

@ -8,9 +8,7 @@
export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec {
encodeKey(k: string): string {
k = super.encodeKey(k);
return k.replace(/\+/gi, '%2B')
.replace(/%5B/, "[").replace(/%5D/, "]")
;
return k.replace(/\+/gi, '%2B');
}
encodeValue(v: string): string {
v = super.encodeValue(v);

View File

@ -8,9 +8,7 @@
export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec {
encodeKey(k: string): string {
k = super.encodeKey(k);
return k.replace(/\+/gi, '%2B')
.replace(/%5B/, "[").replace(/%5D/, "]")
;
return k.replace(/\+/gi, '%2B');
}
encodeValue(v: string): string {
v = super.encodeValue(v);

View File

@ -8,9 +8,7 @@
export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec {
encodeKey(k: string): string {
k = super.encodeKey(k);
return k.replace(/\+/gi, '%2B')
.replace(/%5B/, "[").replace(/%5D/, "]")
;
return k.replace(/\+/gi, '%2B');
}
encodeValue(v: string): string {
v = super.encodeValue(v);

View File

@ -8,9 +8,7 @@
export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec {
encodeKey(k: string): string {
k = super.encodeKey(k);
return k.replace(/\+/gi, '%2B')
.replace(/%5B/, "[").replace(/%5D/, "]")
;
return k.replace(/\+/gi, '%2B');
}
encodeValue(v: string): string {
v = super.encodeValue(v);