Reputation: 9008
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 “
?
Upvotes: 3
Views: 1439
Reputation: 71
I recently created an Elm package that solves this. If you use text' "“"
it'll render “ instead of the escape code. Also works with "“"
, "“"
, and the hex entity "“"
. Should work when fetching from an API. Hope this helps!
Upvotes: 4
Reputation: 36375
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 “
Upvotes: 1