glentities
An HTML entity encoder/decoder for Gleam.
Entities can be encoded using named or hex entity references. Named entity references use the WHATWG “Named character references” list available at https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references.
Quick start
import glentities
glentities.encode("</html>", glentities.Named) // "</html>"
glentities.encode("</html>", glentities.Hex) // "</html>"
glentities.decode("</html>") // "</html>"
glentities.decode("</html>") // "</html>"
Development
gleam test # Run the tests
Installation
This package can be added to your Gleam project:
gleam add glentities
and its documentation can be found at https://hexdocs.pm/glentities.