Subject: | wrap_children fails with escaped characters in attributes |
XML::Twig's wrap_children method does not cope properly with escaping in attribute values.
Please run the attached script. It wraps elements where type="this" in a <type> correctly but fails to wrap elements where type="t&hat":
<entries>
<type id="twig_id_0001" name="this">
<entry id="1" type="this"/>
<entry id="2" type="this"/>
</type>
<entry id="3" type="t&hat"/>
</entries>
If you remove the & and instead have type="that" it works as expected and wraps both types in new elements:
<entries>
<type id="twig_id_0001" name="this">
<entry id="1" type="this"/>
<entry id="2" type="this"/>
</type>
<type name="that">
<entry id="3" type="that"/>
</type>
</entries>
Thanks for all the work you put into XML::Twig - it's a really useful module.
Tom
Message body not shown because it is not plain text.