ezmodex v0.4.0 Ezmodex.HTML.Sanitizer

Provides functions to sanitize HTML

Summary

Functions

Replaces instances of & ‘ “ < > and grave tick with HMTL entity names

Functions

clean(string)
clean(String.t) :: String.t

Replaces instances of & ‘ “ < > and grave tick with HMTL entity names

Examples

iex> Ezmodex.HTML.Sanitizer.clean("<test>")
"&lt;test&gt;"

iex> Ezmodex.HTML.Sanitizer.clean("Tom & Jerry")
"Tom &amp; Jerry"