[erlang-questions] beginner: Generating HTML with ">" from Erlang

Steve Vinoski vinoski@REDACTED
Thu Feb 13 15:33:07 CET 2014


On Thu, Feb 13, 2014 at 7:34 AM, Bengt Kleberg
<bengt.kleberg@REDACTED>wrote:

> Greetings,
>
> Is there an Erlang library that allows me to generate HTML from Erlang
> and that can stop ">" from turning into ">"?
>
> Previously I used
> xmerl:export_simple( [{html, [], [Body]}], xmerl_xml ).
> where Body could be {body, [], ["Some text with >"]}.
> xmerl will transform ">" into ">", but until now the HTML has worked
> well.
>
> Now I need to keep ">".


1> yaws_api:ehtml_expand({body, [], [{p,[],"Some text with >"}]}).
["\n","<","body",[],">",
 [["\n","<","p",[],">","Some text with >","</","p",">"]],
 "</","body",">"]
2> lists:flatten(v(1)).
"\n<body>\n<p>Some text with ></p></body>"

--steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140213/2edf2016/attachment.htm>


More information about the erlang-questions mailing list