From: Petr Baudis Date: Fri, 6 Nov 2009 14:29:08 +0000 (+0100) Subject: [PATCH] gitweb: Fix blob linenr links in pathinfo mode X-Git-Tag: t/v2.7.4~78^2~112^2^2^2^2^2^2^2^2 X-Git-Url: https://repo.or.cz/w/git/gitweb.git/commitdiff_plain/bd63a85ce1e259732ba8fc89f8f98884b05c3bc5 [PATCH] gitweb: Fix blob linenr links in pathinfo mode --- diff --git a/.topdeps b/.topdeps new file mode 100644 index 0000000000..43b8c659cb --- /dev/null +++ b/.topdeps @@ -0,0 +1 @@ +vanilla/master diff --git a/.topmsg b/.topmsg new file mode 100644 index 0000000000..b8d156daa3 --- /dev/null +++ b/.topmsg @@ -0,0 +1,10 @@ +From: Petr Baudis +Subject: [PATCH] gitweb: Fix blob linenr links in pathinfo mode + +In pathinfo mode, we use that refers to the base location +of gitweb in order for various external media links to work well. +However, this means that for the page to refer to itself, it must +regenerate full link, and this is exactly what the blob view page +did not do for line numbers. + +Signed-off-by: Petr Baudis diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index e4cbfc35a7..62325ea877 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -5127,7 +5127,8 @@ sub git_blob { chomp $line; $nr++; $line = untabify($line); - printf "
%4i %s
\n", + printf "\n", $nr, $nr, $nr, esc_html($line, -nbsp=>1); } }