Skip to content

Arcelyth/html_escape

Repository files navigation

html_escape

A HTML escaping and unescaping library for MoonBit.

Examples

Escaping:

assert_eq(escape_quoted("\"'&<>"), "&quot;&#x27;&amp;&lt;&gt;")
assert_eq(escape_safe("<script>alert('xss')</script>"), "&lt;script&gt;alert(&#x27;xss&#x27;)&lt;&#x2F;script&gt;")

Unescaping:

assert_eq(unescape("&lt;div&gt;hello&amp;world&lt;/div&gt;"), "<div>hello&world</div>")

License

MIT License

About

Escaping/unescaping HTML entities.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors