From bd63a85ce1e259732ba8fc89f8f98884b05c3bc5 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Fri, 6 Nov 2009 15:29:08 +0100 Subject: [PATCH] [PATCH] gitweb: Fix blob linenr links in pathinfo mode --- .topdeps | 1 + .topmsg | 10 ++++++++++ gitweb/gitweb.perl | 3 ++- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .topdeps create mode 100644 .topmsg 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); } } -- 2.11.4.GIT