Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xadillax/true-html-escape
True module to escape and unescape html, including some unicode unescaping like `〹` that other escaping modules don't include.
https://github.com/xadillax/true-html-escape
Last synced: 5 days ago
JSON representation
True module to escape and unescape html, including some unicode unescaping like `〹` that other escaping modules don't include.
- Host: GitHub
- URL: https://github.com/xadillax/true-html-escape
- Owner: XadillaX
- License: mit
- Created: 2014-08-05T15:35:45.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-10-08T02:22:17.000Z (about 8 years ago)
- Last Synced: 2024-11-01T09:51:34.542Z (12 days ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 15
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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](https://github.com/vpukhanov/node-escapist).
Installation
----------------From npm:
```sh
$ npm install true-html-escape
```From repo:
```sh
git clone https://github.com/XadillaX/true-html-escape.git
```By [ZIP](https://github.com/XadillaX/true-html-escape/archive/master.zip).
Usage
----------------```javascript
var escaper = require("true-html-escape");escaper.escape("¤¥€"); ///<= ¤¥€
escaper.unescape("<span>王尼玛</span>"); ///<= 王尼玛
escaper.unescape("フランドール"); ///<= フランドール
escaper.unescape("(╭ ̄3 ̄)╭♡") ///<= (╭ ̄3 ̄)╭♡
```> 所以说这货为了反转义一些非常恶心的 Unicode 转义编码,而 [npm](https://www.npmjs.org/search?q=escape%20html) 貌似找不到。
Contribute
----------------You're welcome to improve this module.
Please contact me or just make pull request.
Thanks.