Summary: | A Parser bug : optionnal tags badly handled | ||
---|---|---|---|
Product: | quanta | Reporter: | Nicolas Deschildre <ndeschildre> |
Component: | general | Assignee: | András Manţia <amantia> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Nicolas Deschildre
2003-05-14 19:47:31 UTC
Subject: quanta/quanta/parser CVS commit by amantia: Parsing fix. CCMAIL: 58487-done@bugs.kde.org M +1 -0 parser.cpp 1.84 --- quanta/quanta/parser/parser.cpp #1.83:1.84 @@ -392,4 +392,5 @@ Node *Parser::parseArea(int startLine, i { QString searchFor = (m_dtd->caseSensitive)?tag->name:tag->name.upper(); + searchFor.remove('/'); if ( qTag->stoppingTags.contains( searchFor ) ) { Wow, very fastly resolved! But not totally : it is weird... Take the same example as above and remplace <p> by <li> or even <fjpsdfjp> or whatever : the same bug is still here... Good luck! Subject: Re: A Parser bug : optionnal tags badly handled
> ------- Wow, very fastly resolved!
> But not totally : it is weird... Take the same example as above and
> remplace <p> by <li> or even <fjpsdfjp> or whatever : the same bug is still
> here...
> Good luck!
Does <td> stops the area of <li>? Does it stop the area for <fjpsdfjp> ? ;-)
If yes, than <td> should appear as a stopping tag for <li>. Right now <li> is
"stopped" by <li>. From li.tag:
<stoppingtags>
<stoppingtag>li</stoppingtag>
</stoppingtags>
This means that "<li>sometext<li>sometext</li>" is equal to
"<li>sometext</li><li>sometext</li>". If <td> is not stopping <li>, then
"<li>sometext<td>sometext</td>" is not equal to
"<li>sometext</li><td>sometext</td>", therefor there is a bug in your HTML
code, if you write something like that. And the parser shows you that it's a
bug, as the closing </td> is not on the same level as the opening <td>.
I consider the bug to be fixed, and if you think that some stopping tags are
not listed for some tags, well, the DTD definition should be fixed.
Andras
|