1.1.0 • Published 11 years ago
bloody-escapehtml v1.1.0
escapeHTML
install
$ npm install bloody-escapehtmlrequire
var escapeHTML = require("bloody-escapehtml")api
escapeHTML(string) > escapedString
escapes special HTML chars :
& => &
< => <
> => >
" => "
' => 'escapeHTML.unescapeHTML(string) > string
unescapes special HTML chars.
example
var safeValue = escapeHTML(input.value)
// -> "<div></div>"