Bug 525587 - Close tag missing in XML output of optionally empty tags
Summary: Close tag missing in XML output of optionally empty tags
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-HTML-Tree
Version: 10
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 524832
TreeView+ depends on / blocked
 
Reported: 2009-09-24 22:45 UTC by Jeff Fearn 🐞
Modified: 2009-10-27 16:22 UTC (History)
3 users (show)

Fixed In Version: 3.23-9.fc10
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-29 14:28:01 UTC


Attachments (Terms of Use)
test script exhibiting bug (509 bytes, application/x-perl)
2009-09-24 22:45 UTC, Jeff Fearn 🐞
no flags Details
fix that bug! (609 bytes, patch)
2009-09-24 22:54 UTC, Jeff Fearn 🐞
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
CPAN 49932 None None None Never

Description Jeff Fearn 🐞 2009-09-24 22:45:31 UTC
Created attachment 362580 [details]
test script exhibiting bug

Description of problem:
HTML::Element::as_XML() has a bug where tags added to empty_element_map but which contain data are missing their close tag when generating XML.

Version-Release number of selected component (if applicable):
3.23-4

How reproducible:
Always

Steps to Reproduce:
1. Run attached script
  
Actual results:

Not mapped to empty element (correct)
         <a href="http://example.com/"></a>

Mapped to empty element, no extra content (correct)
        <a href="http://example.com/" />

Mapped to empty element, extra content (missing close tag)
        <a href="http://example.com/">Extra content



Expected results:

Not mapped to empty element (correct)
         <a href="http://example.com/"></a>

Mapped to empty element, no extra content (correct)
        <a href="http://example.com/" />

Mapped to empty element, extra content (correct)
        <a href="http://example.com/">Extra content</a>



Additional info:

I opened an upstream bug with a patch https://rt.cpan.org/Ticket/Display.html?id=49932 however it may take a while for a new version to come out.

Since HTML::Element is the base class for XML::Element this bug affects all XML systems where tags can be optionally empty and people wish to use the short circuit form for the empty tags.

Comment 1 Jeff Fearn 🐞 2009-09-24 22:54:44 UTC
Created attachment 362581 [details]
fix that bug!

Comment 2 Tom "spot" Callaway 2009-09-28 14:45:54 UTC
Updates are building for this now, thanks for the patch.

Comment 3 Fedora Update System 2009-09-28 16:04:53 UTC
perl-HTML-Tree-3.23-9.el4 has been submitted as an update for Fedora EPEL 4.
http://admin.fedoraproject.org/updates/perl-HTML-Tree-3.23-9.el4

Comment 4 Fedora Update System 2009-09-28 16:04:58 UTC
perl-HTML-Tree-3.23-9.el5 has been submitted as an update for Fedora EPEL 5.
http://admin.fedoraproject.org/updates/perl-HTML-Tree-3.23-9.el5

Comment 5 Fedora Update System 2009-09-28 16:05:44 UTC
perl-HTML-Tree-3.23-9.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/perl-HTML-Tree-3.23-9.fc10

Comment 6 Fedora Update System 2009-09-28 16:05:49 UTC
perl-HTML-Tree-3.23-9.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/perl-HTML-Tree-3.23-9.fc11

Comment 7 Fedora Update System 2009-09-29 14:27:56 UTC
perl-HTML-Tree-3.23-9.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2009-09-29 14:37:37 UTC
perl-HTML-Tree-3.23-9.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2009-10-16 19:31:51 UTC
perl-HTML-Tree-3.23-9.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2009-10-16 19:32:53 UTC
perl-HTML-Tree-3.23-9.el4 has been pushed to the Fedora EPEL 4 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 GEORGE GIANNAKIS 2009-10-27 16:22:42 UTC
Eftimios TSIGROS (BANNER)!!!!!!!!!


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