Re: New design of tag nesting cleanup within the parser.

Jorge Arellano Cid <[email protected]>
Newsgroups gmane.comp.web.dillo.devel
Message-ID <[email protected]>
On Wed, Jun 22, 2016 at 03:30:30PM -0400, Jorge Arellano Cid wrote:
> On Wed, Jun 22, 2016 at 02:18:00PM +0000, eocene wrote:
> > Jorge wrote:
> > >  Please check the comments, then browse your regular sites and give it
> > > a test drive, then send some feedback.
> > 
> > The links to articles on arstechnica.com aren't working for me today.
> > The bug meter has lots of "<a> can't contain <figure>".
> 
>   Yes, this is the new HTML5's "transparent" mode.
> 
>   A is a transparent container, which is not yet handled by dillo.
> 
>   Let me think it a bit...

  OK, we don't yet have HTML5 handling in dillo (besides ad-hoc),
but this new design is simpler to tailor to a new set of rules, so
that's the way to go.

  Although it'll take some time, incremental patches will give a better
HTML5 experience step by step.

  Just as a quick and dirty patch so arstecnica, BBC and others may
be read before I come with something more structured, you may try:

diff -r ca794cd4c182 src/html.cc
--- a/src/html.cc       Tue Jun 21 18:04:00 2016 -0400
+++ b/src/html.cc       Wed Jun 22 19:30:15 2016 -0400
@@ -3735,6 +3735,8 @@ static void Html_stack_cleanup_at_open(D
             continue;   // close
       } else if (!(Tags[ni].Flags & 1) && !(Tags[ti].Flags & 4)) {
          // Block element over a NON block container
+         if (ti == i_A && html->DocTypeVersion >= 5.0f)
+            break;
          continue;   // close
       }


HTH.

-- 
  Cheers
  Jorge.-
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.