Bug 994686 - publican incorrectly drops entities in some attributes
publican incorrectly drops entities in some attributes
Status: CLOSED CURRENTRELEASE
Product: Publican
Classification: Community
Component: publican (Show other bugs)
3.1
All All
unspecified Severity medium
: ---
: ---
Assigned To: Jeff Fearn
tools-bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-07 15:02 EDT by Raphaël Hertzog
Modified: 2013-12-18 21:46 EST (History)
2 users (show)

See Also:
Fixed In Version: 4.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-18 21:46:43 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Sample document with entity in attribute (30.00 KB, application/x-gzip)
2013-08-07 15:02 EDT, Raphaël Hertzog
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
CPAN 88973 None None None Never
CPAN 89402 None None None Never
Debian BTS 719000 None None None Never

  None (edit)
Description Raphaël Hertzog 2013-08-07 15:02:39 EDT
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:
<ulink url="&url-bts;566351">#566351</ulink> 

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
Comment 2 Jeff Fearn 2013-09-23 00:52:33 EDT
I expect this is a bug in XML::TreeBuilder, will track it down.
Comment 3 HSS Product Manager 2013-09-23 01:07:32 EDT
HSS-QE has reviewed and declined this request. QE for this bug will be handled by IED.
Comment 4 Jeff Fearn 2013-09-24 03:10:41 EDT
Might be a limitation of XML::Parser::Expat http://www.perlmonks.org/?node_id=384128

Moar digging
Comment 5 Jeff Fearn 2013-09-25 21:59:43 EDT
This is a bug in XML::TreeBuilder, opened a bug upstream.
Comment 6 Jeff Fearn 2013-09-25 23:19:51 EDT
Updated dep versions to require fixed upstream package XML::TreeBuilder, which will be released along with next publican.
Comment 7 Ruediger Landmann 2013-10-10 22:26:39 EDT
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:

<div class="para">
	see <a href="566351">#566351</a>
</div>

The entity did not get resolved
Comment 8 Jeff Fearn 2013-10-10 22:30:21 EDT
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.
Comment 9 Ruediger Landmann 2013-10-10 22:43:27 EDT
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.
Comment 10 Jeff Fearn 2013-10-11 02:15:14 EDT
More correctly, works in root node, but not in child nodes.
Comment 11 Jeff Fearn 2013-10-11 02:29:57 EDT
Opened upstream bug https://rt.cpan.org/Ticket/Display.html?id=89402, committed patch to upstream devel branch.
Comment 12 Jeff Fearn 2013-10-27 23:43:44 EDT
Bumped dep for XML::TreeBuilder to 5.1.

To ssh://git.fedorahosted.org/git/publican.git
   9f1135a..8d543ad  devel -> devel
Comment 13 Ruediger Landmann 2013-10-29 01:07:21 EDT
Attached test case verified with publican-3.9.9-0.fc19.t23.noarch

Note You need to log in before you can comment on or make changes to this bug.