he
he copied to clipboard
useNamedReferences doesn't work for all characters
While setting useNamedReferences
to true
and encodeEverything
to true
, the character /
is encoded as /
but the character \
is encoded as \
The same happens with the hyphen/minus character, which is encoded as -
var entity = he.encode(html, {
useNamedReferences: true,
encodeEverything: true
})