mathiasbynens / he

A robust HTML entity encoder/decoder written in JavaScript.
https://mths.be/he
MIT License
3.45k stars 254 forks source link

Non-English support? #72

Closed coderkind closed 5 years ago

coderkind commented 5 years ago

Hi,

am I right in saying this doesn't support non-English text (such as Arabic)? It seems to be converted to entities when I try.

mathiasbynens commented 5 years ago

That’s what he.encode is supposed to do. From the README:

he.encode(text, options)

This function takes a string of text and encodes (by default) any symbols that aren’t printable ASCII symbols and &, <, >, ", ', and `, replacing them with character references.