he icon indicating copy to clipboard operation
he copied to clipboard

useNamedReferences doesn't work for all characters

Open crlngn opened this issue 5 years ago • 0 comments

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
})

crlngn avatar Jul 12 '19 18:07 crlngn