summaryrefslogtreecommitdiff
path: root/blob.c
diff options
context:
space:
mode:
authorLibravatar Peter Stuge <peter@stuge.se>2011-09-27 11:51:00 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-09-27 09:34:37 -0700
commit2b07ff3ffa04a3d52bb4aec9df9f8b6378e2f2a7 (patch)
tree31dc2c6431fd6b3205ced7a90a76e1a55c051fb8 /blob.c
parentgitweb: Split JavaScript for maintability, combining on build (diff)
downloadtgif-2b07ff3ffa04a3d52bb4aec9df9f8b6378e2f2a7.tar.xz
gitweb: Fix links to lines in blobs when javascript-actions are enabled
The fixLinks() function adds 'js=1' to each link that does not already have 'js' query parameter specified. This is used to signal to gitweb that the browser can actually do javascript when these links are used. There are two problems with the existing code: 1. URIs with fragment and 'js' query parameter, like e.g. ...foo?js=0#l199 were not recognized as having 'js' query parameter already. 2. The 'js' query parameter, in the form of either '?js=1' or ';js=1' was appended at the end of URI, even if it included a fragment (had a hash part). This lead to the incorrect links like this ...foo#l199?js=1 instead of adding query parameter as last part of query, but before the fragment part, i.e. ...foo?js=1#l199 Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'blob.c')
0 files changed, 0 insertions, 0 deletions