Re: H1's inside A's

Dennis New <[email protected]>
Newsgroups gmane.comp.web.dillo.devel
Message-ID <[email protected]>
From: Dennis New <[email protected]>
Newsgroups: gmane.comp.web.dillo.devel
Subject: Re: H1's inside A's
Date: Tue, 29 Apr 2014 19:01:33 -0400
X-Newsreader: Sylpheed 3.2.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu)

On 30 Apr 2014 00:34:58 +0200, Sebastian Geerken wrote:
> On Di, Apr 29, 2014, Johannes Hofmann wrote:
> > On Sun, Apr 27, 2014 at 10:57:09PM -0400, Dennis New wrote:
> > > I know technically the H1 heading tags aren't allowed between
> > > A../A, and Dillo rightfully complains about this:
> > > 
> > >    "a" is not allowed to contain "h1". -- closing "a"
> > > 
> > > But it seems like an innocent tiny mistake. Can't dillo linkify
> > > anyways, in addition to throwing this error? Currently the
> > > link-information is lost and only accessibly if I manually view
> > > the source and copy-paste it. Other browsers (i.e. webkitgtk
> > > based ones) do this, which is quite useful.
> > 
> > I agree, that it would be nice to have those links working - while
> > still reporting it as an error.
> > I didn't check yet how complicated it would be to get things working
> > that way.
> 
> Would this not collide with rules to implicitely close <a> in HTML
> (not XHTML!)?
> 
> Anyway: The attached page behaves the same way in dillo as in Firefox.

My webkitgtk browser behaves differently -- it doesn't automatically
close the first "nowhere" link, until the next one starts. The DOM tree
looks like:

  http://imgur.com/4OHrNHN

By the way, I came across this case on a website that wanted to have
the titles to stories as links, and bigger text size, something like:

  <a href="story1"><h1>Story One Title</h1></a>

And in such cases, dillo won't render the link. The html rule banning
such constructs doesn't seem obvious to me, so I imagine there are many
such cases floating around. H1 kinda is just a <font size="+1"> with a
<br> at the end :P.


> OTOH, w3m closes the first, but not the second <a> implicitely. Do
> you have other test cases?
> 
> (I haven't looked in detail at the specs, and it may be different in
> HTML 5.)
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.