Hi
is there any way i can make the encodeURIComponent method ignore certain characters for example if i don't want it to encode the £ sign. ?
thank you
Hi
is there any way i can make the encodeURIComponent method ignore certain characters for example if i don't want it to encode the £ sign. ?
thank you
This is not possible without wrapping it yourself.
Probably the safest thing to do would be...not do this. If you're a thrill seeker, just undo the parts you want decoded after the encoding is complete.
Something like this might be a naive way (i.e. my way) of doing it:
encodeURIComponent(uri).replace('%A3','£')