/html-encoder

encodes html

Primary LanguageJavaScript

html-encoder

Encodes html

Usage

const encode = require('path/to/html-encoder')
encode('<span>Hello</span>')
// => '&lt;span&gt;Hello&lt;/span&gt;'

API

html-encoder(string)

Encodes html

string

Type: string

HTML string to be encoded.

License

MIT © Emil Johansson