From: Jürgen Kreileder Date: Tue, 09 Apr 2013 17:54:16 GMT Subject: Re: [PATCH 3/4] gitweb: Don't append ';js=(0|1)' to external links Message-ID: In-Reply-To: <516430D5.6030201@gmail.com> Jakub Narębski writes: > Jürgen Kreileder wrote: > >> Don't add js parameters to links outside of gitweb itself. > > Hmmm... this limits adding ';js=(0|1)' to only links which begin with > $my_url, i.e. absolute links beginning with gitweb's base URL. > > Wouldn't that mean that most internal gitweb-generated links wouldn't > get ';js=(0|1)'? href(..., -full => 1) is not the default... No, link.href is always absolute in JavaScript - even if the emitted URL was relative. Old: https://git.blackdown.de/old.cgi?p=contactalbum.git;a=summary;js=1 New: https://git.blackdown.de/?p=contactalbum.git;a=summary;js=1 With the old version the external links in the description got ';js=1' appended. With the new version, ';js=1' isn't on those links. Other links are the same in both versions. >> Signed-off-by: Jürgen Kreileder >> --- >> gitweb/gitweb.perl | 2 +- >> gitweb/static/js/javascript-detection.js | 4 ++-- >> 2 files changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl >> index 1309196..f0912d7 100755 >> --- a/gitweb/gitweb.perl >> +++ b/gitweb/gitweb.perl >> @@ -4165,7 +4165,7 @@ sub git_footer_html { >> print qq!