mde / ejs

Embedded JavaScript templates -- http://ejs.co
Apache License 2.0
7.7k stars 841 forks source link

Is it possible to encode in hexadecimal ? #689

Closed ghost closed 2 years ago

ghost commented 2 years ago

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:

Thank you 👍🏻

mde commented 2 years ago

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.

ghost commented 2 years ago

Thank you so much for providing that option. I didn't know about that.