https://github.com/crowdhailer/eex_html
Extension to Embedded Elixir (EEx), that allows content to be safely embedded into HTML.
https://github.com/crowdhailer/eex_html
elixir-language html web
Last synced: 2 months ago
JSON representation
Extension to Embedded Elixir (EEx), that allows content to be safely embedded into HTML.
- Host: GitHub
- URL: https://github.com/crowdhailer/eex_html
- Owner: CrowdHailer
- License: apache-2.0
- Created: 2018-09-11T19:12:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-27T10:01:56.000Z (about 1 year ago)
- Last Synced: 2025-02-28T00:10:18.133Z (3 months ago)
- Topics: elixir-language, html, web
- Language: Elixir
- Homepage: https://hex.pm/packages/eex_html
- Size: 22.5 KB
- Stars: 3
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# EExHTML
**Extension to Embedded Elixir (EEx), that allows content to be safely embedded into HTML.**
[](https://hex.pm/packages/eex_html)
[](https://travis-ci.org/CrowdHailer/eex_html)
[](LICENSE)- [Install from hex.pm](https://hex.pm/packages/eex_html)
- [Documentation available on hexdoc](https://hexdocs.pm/eex_html)## Usage
```elixir
iex> title = "EEx Rocks!"
iex> content = ~E"<%= title %>
"
iex> "#{content}"
"EEx Rocks!
"iex> title = ""
iex> content = ~E"<h1><%= title %></h1>"
iex> "#{content}"
"<h1><script></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](https://groups.google.com/forum/#!topic/elixir-lang-core/NC3TSaw19uk).