entity2utf8

Find and replace HTML entities to UTF-8 symbols

Usage no npm install needed!

<script type="module">
  import entity2utf8 from 'https://cdn.skypack.dev/entity2utf8';
</script>

README

Build Status Coverage Status NPM Version Dependency Status NPM Downloads

entity2utf8

Find and replace HTML entities to UTF-8 symbols.

Ignore entities:

  • &lt;
  • &gt;
  • &amp;
  • &quot;
  • &apos;

CLI

npm install entity2utf8 -g

entity2utf8 mytext.txt

entity2utf8 mytext1.txt mytext2.txt mytext3.txt

entity2utf8 --ignore "&nbsp;,&raquo;" mytext1.txt

entity2utf8 --ignore "&nbsp;,&raquo;" --exts ".html,.htm" .

entity2utf8 --replace --ignore "&nbsp;,&raquo;" --exts ".html,.htm" .

License

MIT License