Name: html-decoder
Owner: Yahoo Inc.
Description: The first HTML5 compliant HTML decoder.
Created: 2015-06-18 04:42:12.0
Updated: 2015-06-24 16:01:05.0
Pushed: 2015-06-25 07:50:46.0
Size: 217
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
The first HTML5 compliant HTML decoder. This decoder is implemented based on the HTML5 specification and can decode the full named character reference list based on this json.
Install the npm html-decoder from the npm repo.
install html-decoder
Decoding a string with numeric and named character reference.
reate the html decoder */
HTMLDecoder = require("html-decoder");
htmlString = ">>>a ...";
tml = '<<<a...'; */
html = HTMLDecoder.decode(htmlString);
run-script build
test
run-script gen
https://html.spec.whatwg.org/multipage/entities.json
EPO_HOME is the home directory of this repo.
ntities.json $REPO_HOME/data
e output is saved @ src/gen/trie.js
n/genhtmlentities data/entities.json
test
This software is free to use under the BSD license. See the LICENSE file for license text and copyright information.