Re: Autoclose for <script> and <style> in HTML::Parser
Alex Kapranoff <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.lwp |
|---|---|
| Organization | Inner Mongolia |
| Message-ID | <[email protected]> |
* Gisle Aas <[email protected]> [June 08 2006, 18:23]: > > Why is it so? It breaks my tests so I'd like to know the rationale > > behind this :) Can someone enlight me? > > Probably just that I found some other browsers that appeared to behave > like that. What behaviour do you suggest is the sane one? I'm ok with this explanation. Browsers on my machine display this case in different ways but none of them seems to actually interpret anything inside these unclosed elements (anything after opening tag). It would, to my mind, be more logical NOT to create artificial end_tag event so that the element last till EOF (all the other elements do so). MSIE 6 seems to do so, but not Firefox & Opera -- they interpret the lonely '<script>' as '<script></script>' -- they close it immediatly. I do not know which way is the best. But HTML::Parser appears to have its own -- it closes '<script>' at the next opening tag. -- Alex Kapranoff.