mirror of
https://github.com/tcgdex/javascript-sdk.git
synced 2025-04-22 10:42:10 +00:00
Added URL URLs Normalization
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
4597476e6b
commit
6c5fc609ae
@ -71,6 +71,9 @@ export default class TCGdex {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private rwgr<T = any>(...url: Array<string | number>) {
|
private rwgr<T = any>(...url: Array<string | number>) {
|
||||||
return RequestWrapper.getRequest<T>(`${this.getBaseUrl()}/${url.map((v) => encodeURI(v.toString())).join('/')}`)
|
return RequestWrapper.getRequest<T>(`${this.getBaseUrl()}/${url.map((v) => encodeURI(
|
||||||
|
// Normalize URL
|
||||||
|
v.toString().replace('?', '%3F').normalize('NFC').replace(/["'\u0300-\u036f]/g, "")
|
||||||
|
)).join('/')}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user