Is sgmllib.py 's BUG?

limodou chatme at 263.net
Thu Oct 18 21:51:14 EDT 2001


"Sean 'Shaleh' Perry" <shalehperry at home.com> wrote in message news:<mailman.1003384458.10137.python-list at python.org>...
> 
> at the start:
> special = re.compile('<![^<>]*>')
> then later:
> match = special.match(rawdata, i)
> if match:
>     if self.literal:
>         self.handle_data(rawdata[i])
>         i = i+1
>         continue
>     i = match.end(0)
>     continue
> 
> so if you want to handle <!DOCTYPE> it needs to be in a data handler.
> 
> -----
> We have buried the putrid corpse of Liberty. -- Benito Mussolini

Great! Your changes is better than me. I'v fixed my sgmllib.py with it.



More information about the Python-list mailing list