Bug 525587

Summary: Close tag missing in XML output of optionally empty tags
Product: [Fedora] Fedora Reporter: Jeff Fearn 🐞 <jfearn>
Component: perl-HTML-TreeAssignee: Tom "spot" Callaway <tcallawa>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: 10CC: georgios.giannakis.stavros, perl-devel, tcallawa
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 3.23-9.fc10 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-29 14:28:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 524832    
Attachments:
Description Flags
test script exhibiting bug
none
fix that bug! none

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)!!!!!!!!!