From: "Giuseppe Bilotta" <giuseppe.bilotta@gmail.com>
To: "Jakub Narebski" <jnareb@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [BUG/RFH] gitweb: Trouble with ref markers being hyperlinks because of illegally nested links
Date: Sun, 11 Jan 2009 21:59:58 -0500 [thread overview]
Message-ID: <cb7bb73a0901111859q3a166d92k5176b27af2c4d256@mail.gmail.com> (raw)
In-Reply-To: <200901120215.13668.jnareb@gmail.com>
On Sun, Jan 11, 2009 at 8:15 PM, Jakub Narebski <jnareb@gmail.com> wrote:
> Commit 4afbaef by Giuseppe Bilotta (gitweb: ref markers link to named
> shortlogs) turned ref markers for tags and heads into links to
> appropriate views for the ref name.
>
> Unfortunately the code didn't take into account the fact that nesting
> links (A elements) is illegal in (X)HTML:
>
> 12.2.2 Nested links are illegal
>
> Links and anchors defined by the A element must not be nested;
> an A element must not contain any other A elements.
>
> (from http://www.w3.org/TR/html401/struct/links.html#h-12.2.2), and that
> some browsers (e.g. Mozilla 1.17.2 I still use) in the very strict
> conformance mode (application/xhtml+xml mimetype and XML + XHTML DTD)
> _enforce_ this requirement by moving inner link immediately outside the
> end of outer link, i.e. for the HTML source looking like the following
> <a ...> some text <a ...>v1.5.1</a></a>
> rendered HTML (which you can see using "View Selection Source") is
> instead
> <a ...> some text </a><a ...>v1.5.1</a>
> And of course SPAN elements which wraps inner link (inner A element) is
> _not_ moved.
>
>
> This is quite easy to fix for hyperlinked ref markers in 'shortlog' and
> 'history' views: just close the "title" hyperlink before printing
> $extra, i.e. ref markers. I have even made a patch doing that. Then
> instead of incorrect
> _Merge branch into maint_ [] _maint_
> where _aaa_ means that 'aaa' is hyperlink, and [xxx] is a fer marker,
> we will have correct:
> _Merge branch into maint_ [_maint_]
> See that we have two separate and not nested links...
I've seen from the list that you already have patches ready to fix at
least this problem. I think we might start from having these patches
in while we think of the best way to fix the biggest issue:
> What is more complicated is the issue of ref marker from
> git_print_header_div e.g. in 'commit'/'commitdiff' view, and in 'log'
> view. There link is made into block element using "display: block;"
> CSS rule (div.title, a.title), so that you can click _anywhere_ on the
> header block. This breaks layout even worse, making hyperlinked ref
> marker text appear *below* header div:
>
> -----------------------------------------------------------
> |_Merge branch into maint_ [] |
> -----------------------------------------------------------
> _maint_
>
> To preserve current layout and behavior it would be needed to do some
> deep HTML + CSS positioning hackery, perhaps with additional link block
> without any text... But I don't know exactly how to do this; all [few]
> experiments I did failed.
>
> I see possible the following alternate solutions:
> * Ignore this issue (e.g. if it does not affect modern browsers)
That would be my current choice until we find a better solution.
> * Revert 4afbaef (we lose feature, but how often used is it?)
> * Always use quirks mode, or check browser and use quirks mode if it
> would break layout
> * Use extra divs and links and CSS positioning to make layout which
> looks like current one, and behaves as current one, but is more
> complicated.
I'm asking on #html, hopefully I'll get some interesting idea to try for this.
--
Giuseppe "Oblomov" Bilotta
next prev parent reply other threads:[~2009-01-12 3:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-12 1:15 [BUG/RFH] gitweb: Trouble with ref markers being hyperlinks because of illegally nested links Jakub Narebski
2009-01-12 2:59 ` Giuseppe Bilotta [this message]
2009-01-13 0:13 ` Jakub Narebski
2009-01-13 0:59 ` Giuseppe Bilotta
2009-01-14 0:17 ` [RFC/PATCH] gitweb: Fix nested links problem with ref markers Jakub Narebski
2009-01-14 3:56 ` Giuseppe Bilotta
2009-01-14 10:39 ` Jakub Narebski
2009-01-14 13:52 ` Giuseppe Bilotta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cb7bb73a0901111859q3a166d92k5176b27af2c4d256@mail.gmail.com \
--to=giuseppe.bilotta@gmail.com \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).