Discussion:
H1's inside A's
Dennis New
2014-04-28 02:57:09 UTC
Permalink
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.
Johannes Hofmann
2014-04-29 21:56:17 UTC
Permalink
Post by Dennis New
I know technically the H1 heading tags aren't allowed between A../A,
"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
2014-04-29 22:34:58 UTC
Permalink
Post by Johannes Hofmann
Post by Dennis New
I know technically the H1 heading tags aren't allowed between A../A,
"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
Dennis New
2014-04-29 23:03:23 UTC
Permalink
From: Dennis New <dennisn-***@public.gmane.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)
Post by Sebastian Geerken
Post by Johannes Hofmann
Post by Dennis New
I know technically the H1 heading tags aren't allowed between
"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.
Post by Sebastian Geerken
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
2014-04-29 23:36:42 UTC
Permalink
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
Post by Dennis New
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)
Post by Sebastian Geerken
Post by Johannes Hofmann
Post by Dennis New
I know technically the H1 heading tags aren't allowed between
"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
http://imgur.com/4OHrNHN
By the way, I came across this case on a website that wanted to have
<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.
Post by Sebastian Geerken
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.)
_______________________________________________
Dillo-dev mailing list
http://lists.dillo.org/cgi-bin/mailman/listinfo/dillo-dev
Loading...