[Dillo-dev] H1's inside A's

1 view
Skip to first unread message

Dennis New

unread,
Apr 27, 2014, 10:57:09 PM4/27/14
to dill...@dillo.org
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.

_______________________________________________
Dillo-dev mailing list
Dill...@dillo.org
http://lists.dillo.org/cgi-bin/mailman/listinfo/dillo-dev

Johannes Hofmann

unread,
Apr 29, 2014, 5:56:17 PM4/29/14
to dill...@dillo.org
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.

Cheers,
Johannes

Sebastian Geerken

unread,
Apr 29, 2014, 6:34:58 PM4/29/14
to dill...@dillo.org
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.
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.)

Sebastian

h1-inside-a.html
signature.asc

Dennis New

unread,
Apr 29, 2014, 7:03:23 PM4/29/14
to dill...@dillo.org
From: Dennis New <den...@dennisn.linuxd.org>
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.)

Benjamin Woolley

unread,
Apr 29, 2014, 7:36:42 PM4/29/14
to Dennis New, dill...@dillo.org
I see the anchor as an inline element and the header as a block element, and spanning inlines across blocks makes me cringe. However, an anchor has a very important meaning because of its function. Its loss is different than the loss of an em tag, for example. I am in the strict camp, but would overlook breaking a spec in this case.

Ben
Reply all
Reply to author
Forward
0 new messages