Opened 18 years ago

Last modified 17 years ago

#537 defect closed fixed (fixed)

Microdom case insensitivity doesn't work right.

Reported by: jknight Owned by:
Priority: high Milestone:
Component: web Keywords:
Cc: Cory Dodt, radix, itamarst, jknight Branch:
Author:

Description


Change History (6)

comment:1 Changed 18 years ago by jknight

The code:
from twisted.web import microdom
import sys

x = microdom.parseString("""                                                   
    <html>                                                                          
      <hEAd><tITle>Hello World & Invalid Amperstands</Head>                         
      <body>                                                                        
        <H1>Hello World!</b>""", beExtremelyLenient=True)

x.writexml(sys.stdout)

Results in:
<?xml version="1.0"?><html><head><title>Hello World &amp;Invalid Amperstands</
title><body><h1>Hello World!</h1></body></head></html>

Note that it didn't put </head> in the right place. The capital "H" *in combination with* the missing </
title> seems to have confused it. Perhaps it isn't insensitivizing the comparison when looking up the 
stack of open tags for one to close?

comment:2 Changed 18 years ago by jknight

Just noticed, also, that it ate the space after "&" before "Invalid". Really shouldn't do that.

comment:3 Changed 18 years ago by radix

Does #526 's patch solve this?

comment:4 Changed 18 years ago by jknight

Nope, tried it, didn't do anything. I'm not quite sure what that issue is supposed to solve.

comment:5 Changed 17 years ago by itamarst

I fixed this a while back.

comment:6 Changed 11 years ago by <automation>

Owner: itamarst deleted
Note: See TracTickets for help on using tickets.