Open ukusormus opened 1 year ago
Thanks @ukusormus, feel up for tackling the change(s)?
How do we solve it? Remove current form of HTML encoding/decoding. Maybe look for a better JavaScript solution or omit it entirely?
Let's omit it.
Rename the usage of URL encode/decode to reflect that they're meant for URL parameter values, and/or add encodeURI() also. See more: When are you supposed to use escape instead of encodeURI / encodeURIComponent? - an answer on Stack Overflow
Clarify what it's meant for, and add encodeURI()
.
What's the issue?
In Appendix: Leveraging Dev Tools > Encoding and Decoding:
Suggesting use of
escape()
andunescape()
JavaScript functions for HTML encoding/decoding, while:Suggesting use of
encodeURIComponent()
anddecodeURIComponent
for URL encoding/decoding, while:How do we solve it?
encodeURI()
also. See more: When are you supposed to use escape instead of encodeURI / encodeURIComponent? - an answer on Stack Overflow