]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: pull ref markes pull out of subject <a> element
authorGiuseppe Bilotta <redacted>
Sun, 23 Aug 2009 08:28:09 +0000 (10:28 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:50:39 +0000 (00:50 -0400)
Since 4afbaef (gitweb: ref markers link to named shortlogs, 2008-09-02),
ref markers that accompany the subject in views such as shortlog and
history point to something different from the subject itself. Therefore,
they should not be included in the same <a> element.

Benefits of the change are:

 * better compliance to the XHTML standards, that forbid links within
   links even though the restriction cannot be imposed via DTD; this also
   benefits visualization in some older browsers;

 * when hovering the subject, only the subject itself is underlined; when
   hovering the ref markers, only the text in the hovered ref marker is
   underlined; previously, hovering any written part of the subject column
   led to complete underlying of everything at the same time, with
   unpleasing effects.

Signed-off-by: Giuseppe Bilotta <redacted>
Acked-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index 6b1239817d6782cca396ede4340f9b2738ffebe1f1ac15263cf9ea64a4bf8ce2..3009392748ef4df1224387c1e89d42217eff32cd84e53631385df5d642d4c6af 100755 (executable)
@@ -1525,10 +1525,10 @@ sub format_subject_html {
                $long =~ s/[[:cntrl:]]/?/g;
                return $cgi->a({-href => $href, -class => "list subject",
                                -title => to_utf8($long)},
-                      esc_html($short) . $extra);
+                      esc_html($short)) . $extra;
        } else {
                return $cgi->a({-href => $href, -class => "list subject"},
-                      esc_html($long)  . $extra);
+                      esc_html($long)) . $extra;
        }
 }
 
This page took 0.026985 seconds and 4 git commands to generate.