CrowdHailer / eex_html

Extension to Embedded Elixir (EEx), that allows content to be safely embedded into HTML.
https://hex.pm/packages/eex_html
Apache License 2.0
3 stars 5 forks source link
elixir-language html web

EExHTML

Extension to Embedded Elixir (EEx), that allows content to be safely embedded into HTML.

Hex pm ![Build Status](https://secure.travis-ci.org/CrowdHailer/eex_html.svg?branch=master "Build Status") License

Usage

iex> title = "EEx Rocks!"
iex> content = ~E"<h1><%= title %></h1>"
iex> "#{content}"
"<h1>EEx Rocks!</h1>"

iex> title = "<script>"
iex> content = ~E"<h1><%= title %></h1>"
iex> "#{content}"
"<h1>&lt;script&gt;</h1>"

Elixir language proposal

I would like to see this project as part of the Elixir language. The reasons for this are explained in this proposal.