[erlang-questions] beginner: Generating HTML with ">" from Erlang
Thu Feb 13 15:48:05 CET 2014
I think it's not possible to add CDATA or PCDATA directives in
out-of-the-box xmerl. But you can write your own callback module by simply
copying xmerl_xml and changing '#text#'/1 slightly:
'#text#'(Text) -> ["<![PCDATA[", xmerl_lib:export_text(Text), "]]>"].
On Thu, 13 Feb 2014 15:25:43 +0100, Bengt Kleberg
> This also sounds like a good idea. You would not happen to know how I
> could get "![PCDATA[" into xmerl tuples?
> On Thu, 2014-02-13 at 15:20 +0100, Szoboszlay Dániel wrote:
>> The browser shall parse > as < in PCDATA before interpreting it as
>> On Thu, 13 Feb 2014 15:13:56 +0100, Bengt Kleberg
>> <> wrote:
>> > On Thu, 2014-02-13 at 13:59 +0100, Anthony Ramine wrote:
>> >> Mmmmh, right. Was thinking about <.
>> >> That being said, code consuming HTML or XML shouldn’t see a
>> >> and not escaping could also introduce other bugs, as ]]> is not
>> >> supposed to appear in content (in XML). This leads us to the original
>> >> question, which was « why do you need to do this? ».
>> > _______________________________________________
>> > erlang-questions mailing list
>> > http://erlang.org/mailman/listinfo/erlang-questions
>> erlang-questions mailing list
> erlang-questions mailing list
More information about the erlang-questions