@steelbrain/entities-to-unicode
v1.0.0
Published
Encode HTML Entities to Unicode characters
Downloads
3
Readme
Entities to Unicode
Encode HTML Entities to Unicode characters
API
// API
export default function entitiesToUnicode(input: string): string;
Usage
This package was inspired from Handlbars.Utils.escapeExpression, but instead of converting entities to non-human friendly characters, for example from &
to &
, it converts them to their closest unicode characters.
This is helpful when sending emails with both cleartext and HTML versions, as you can re-use your variables across both.
NOTE: Do not encode URLs with unicode, they will break.
License
This project is licensed under the terms of MIT License. See the License file for more info.