Phoenix.HTML

Conveniences for working HTML strings and templates.

When used, it imports this module and, in the future, many other modules under the Phoenix.HTML namespace.

HTML Safe

One of the main responsibilities of this module is to provide convenience functions for escaping and marking HTML code as safe or unsafe.

In order to mark some code as safe, developers should simply wrap their IO data in a {:safe, data} tuple. Alternatively, one can simply use the safe/1 function.

Summary

html_escape(buffer)

Escapes the HTML entities in the given string

safe(value)

Marks the given value as HTML safe

Functions

html_escape(buffer)

Escapes the HTML entities in the given string.

safe(value)

Marks the given value as HTML safe.