replaceAll not working ( I think so )
RixTheTyrunt

I made Ifcurs replace all `%20` thingies with `+` like a real browser. But, sadly, the system does not/can't ( however you say ) replace those `+` as `%20`, and then decode them again into normal spaces. Can somebody explain what did I mess with my code?

You are viewing a single comment. View All
Answered by ch1ck3n [earned 5 cycles]
`encodeURIComponent()` encodes the % signs in %20, so `encodeURIComponent('a%20a')` returns `'a%2520a'`. Instead of `encodeURIComponent(search).replaceAll("%20", "+")`, use `encodeURIComponent(search).replaceAll("%2520", "+")`
@RixTheTyrunt nevermind, `encodeURIComponent()` doesnt encode spaces, check @ch1ck3n 's reply