Is it possible to encode in hexadecimal ?
bacloud23 opened this issue · comments
ba commented
I'm rendering some URLs and after running some HTML validators, they point to "impermissible" values in URLs.
It is multilanguage website so these are expected:
href="http://domain.com/ééééé.html"
(accent)href="http://domain.com/hello world.html"
(white-space)href="http://domain.com/منزل.html"
(non-latin)
Thank you 👍🏻
Matthew Eernisse commented
This doesn't seem like an EJS-specific question, but — seems possible that older validators might not handle these values correctly. In any case, I would likely encode these values using the usual encodeURIComponent
, which would output values that you could use with confidence everywhere.
Deleted user commented
Thank you so much for providing that option. I didn't know about that.