[erlang-questions] XMERL Atr String Escaping

Vlad Dumitrescu vladdu55@REDACTED
Fri Jan 23 14:08:07 CET 2015


Hi!

I guess that it's not escaped because it's not required to be. Only & and <
must be, according to the spec (http://www.w3.org/TR/xml11/#syntax). > must
be escaped in text when part of the string "]]>".

Do you have a parser that chokes on that?

regards,
Vlad


On Fri, Jan 23, 2015 at 12:19 PM, Anthony Jackson <
anthony.jackson@REDACTED> wrote:

> Hi
>
> It would seem that XMERL doesn’t escape greater than characters in
> Attribute strings.
> Is this a bug, or is this intentional?
>
> Function to look at is ./xmerl-1.3.6/src/xmerl_lib.erl ->
> export_attribute/2
>
> 12> f(Packet), Packet = [{ussd,[ {'STRING',"this has > escape"}],["this
> has > escape", {cookie,[],[]}]}].
> [{ussd,[{'STRING',"this has > escape"}],
>        ["this has > escape",{cookie,[],[]}]}]
> 13> lists:flatten(xmerl:export_simple(Packet, xmerl_xml)).
> "<?xml version=\"1.0\"?><ussd STRING=\"this has > escape\">this has >
> escape<cookie/></ussd>”
>
> --
> Anthony
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150123/6f918bf4/attachment.htm>


More information about the erlang-questions mailing list