Re: Problem tidying.

Concerning
    <table><form><tr>...</form></table>
there's a heuristic which sometimes help:
1.  if there is a start-tag <X> inside an element <E>...
    and X is not allowed inside E
    but E is allowed inside X
    and X is allowed inside E's parent
    then move <X> to just before <E>...

2.  if there is an end-tag </X> inside an element <E>...
    and X is not allowed inside E    -- these two conditions
    but E is allowed inside X        -- imply that X is not E
    and X is (now) E's parent
    then replace </X> by </E></X><E>
    and flag the new <E> as generated by Tidy.

3.  if you find <E></E> where <E> was generated by Tidy,
    quietly remove both <E> and </E>.

In the table/form case, we get              *
    <form><table><tr>...</table></form><table></table>
and rule 3 then quietly erases <table></table>

Received on Wednesday, 11 June 2003 21:07:15 UTC