Red Hat Bugzilla – Bug 994686
publican incorrectly drops entities in some attributes
Last modified: 2013-12-18 21:46:43 EST
Created attachment 784087 [details]
Sample document with entity in attribute
Take the attached test case. It contains an entity:
<!ENTITY url-bts "http://bugs.debian.org/">
This entity is put in a url attribute of a ulink tag:
When you generate the HTML output, the entity is not correctly expanded. In fact it's dropped. If you look at the intermediary files you will see that the entity is still there in the tmp/xml_tmp/ tree, but it's gone from tmp/xml/.
This suggests that Publican is incorrectly dropping that entity from the XML.
This bug has been originally reported to Debian by Simon Paillard in http://bugs.debian.org/719000
I expect this is a bug in XML::TreeBuilder, will track it down.
HSS-QE has reviewed and declined this request. QE for this bug will be handled by IED.
Might be a limitation of XML::Parser::Expat http://www.perlmonks.org/?node_id=384128
This is a bug in XML::TreeBuilder, opened a bug upstream.
Updated dep versions to require fixed upstream package XML::TreeBuilder, which will be released along with next publican.
Still doesn't seem to be working in publican-3.9.9-0.fc19.t4.noarch
I constructed the test case from comment #0 but when I built it:
<para>see <ulink url="&url-bts;566351">#566351</ulink> </para>
got transformed to:
see <a href="566351">#566351</a>
The entity did not get resolved
The publican users guide has this in the Introduction.xml file, does that work for you?
Make sure that if you are doing this you include the full DOCTYPE including the reference to the entity file.
Works as expected with an entity used in the id of an element (like in the PUG), but doesn't work in the URL case reported in this bug.
More correctly, works in root node, but not in child nodes.
Opened upstream bug https://rt.cpan.org/Ticket/Display.html?id=89402, committed patch to upstream devel branch.
Bumped dep for XML::TreeBuilder to 5.1.
9f1135a..8d543ad devel -> devel
Attached test case verified with publican-3.9.9-0.fc19.t23.noarch