true-html-escape
v1.0.0
Published
True module to escape and unescape html, including some unicode unescaping like `〹` that other escaping modules don't include.
Downloads
52
Maintainers
Readme
True Html Escape
True module to escape and unescape html, including some unicode unescaping like 〹
that other escaping modules don't include.
Thanks to the base module node-escapist.
Installation
From npm:
$ npm install true-html-escape
From repo:
git clone https://github.com/XadillaX/true-html-escape.git
By ZIP.
Usage
var escaper = require("true-html-escape");
escaper.escape("¤¥€"); ///<= ¤¥€
escaper.unescape("<span>王尼玛</span>"); ///<= <span>王尼玛</span>
escaper.unescape("フランドール"); ///<= フランドール
escaper.unescape("(╭ ̄3 ̄)╭♡") ///<= (╭ ̄3 ̄)╭♡
所以说这货为了反转义一些非常恶心的 Unicode 转义编码,而 npm 貌似找不到。
Contribute
You're welcome to improve this module.
Please contact me or just make pull request.
Thanks.