marcosh marcosh - 7 months ago 42
HTML Question

Elm - do not escape html string

The documentation of ELM Html clearly states that


It will escape the string so that it appears exactly as you specify


How should I do then if I want to escape the string, instead?

For example, suppose I have the string
"“"
, how could I render it as
?

Answer

The only way around that limitation is to use unicode characters instead of escaping. That is, your rendered HTML will actually contain the unicode rather than the html-escaped value of “

See this related discussion.