Edgewall Software

Opened 16 years ago

Closed 16 years ago

Last modified 4 years ago

#243 closed defect (fixed)

Invalid XML when buffer="false" in py:match

Reported by: felix.schwarz@… Owned by: cmlenz
Priority: critical Milestone: 0.5.1
Component: Template processing Version: 0.5
Keywords: Cc:

Description

When switching from Genshi 0.4.4 to 0.5 I noticed that Genshi generates invalid XML in some situations when buffer is set to False in py:match.

An example for invalid XML generated by Genshi (note the duplicated closing body tag):

<html xmlns="http://www.w3.org/1999/xhtml">
    <body>
        <div id="banner">
            This is the original text in ticket
        </div>
    </body>
  </body>
</html>

Attachments (2)

test_invalid_xml.py (790 bytes) - added by felix.schwarz@… 16 years ago.
Testcase which demonstrates the behavior (works with Genshi 0.4.4)
ticket243.diff (2.7 KB) - added by cmlenz 16 years ago.
Patch that should address the issue, but not tested much

Download all attachments as: .zip

Change History (6)

Changed 16 years ago by felix.schwarz@…

Testcase which demonstrates the behavior (works with Genshi 0.4.4)

comment:1 Changed 16 years ago by cmlenz

  • Component changed from General to Template processing
  • Status changed from new to assigned

Ouch. This seems to be caused by a match template not including the match content, i.e. no select() calls.

Changed 16 years ago by cmlenz

Patch that should address the issue, but not tested much

comment:2 Changed 16 years ago by cmlenz

I've attached a patch to this ticket that should fix the trailing close tag.

comment:3 Changed 16 years ago by cmlenz

  • Resolution set to fixed
  • Status changed from assigned to closed

After more testing, checked in in [897]. Additional verification would be appreciated.

Thanks for reporting this problem!

comment:4 Changed 16 years ago by cmlenz

And ported to 0.5.x for 0.5.1 in [898].

Note: See TracTickets for help on using tickets.