MediaProxy.url(file)
}' />"
)
+ |> HtmlSanitizeEx.basic_html()
end)
end
]
# TODO: make it use something other than @link_regex
- def html_escape(text, "text/html") do
- HtmlSanitizeEx.basic_html(text)
- end
-
- def html_escape(text, "text/plain") do
+ def html_escape(text) do
Regex.split(@link_regex, text, include_captures: true)
|> Enum.map_every(2, fn chunk ->
{:safe, part} = Phoenix.HTML.html_escape(chunk)