]> Lady’s Gitweb - Gitweb/commit
gitweb: Better git-unquoting and gitweb-quoting of pathnames
authorJakub Narebski <redacted>
Wed, 8 Nov 2006 10:48:56 +0000 (11:48 +0100)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:11 +0000 (00:07 -0400)
commit5d944b9d5c813f44ee25ce55ec7dc37caa62bab6caea5827f5296de1cc8902eb
treefcc9e379f460a4f65023ef015308ab86a9985316bbc3c182fc47e1ac0281be8f
parent704f5e109dd0609873779ed12b868a9b3479d52fbf8539e58277d579cabe5c84
gitweb: Better git-unquoting and gitweb-quoting of pathnames

Extend unquote subroutine, which unquotes quoted and escaped filenames
which git may return, to deal not only with octal char sequence
quoting, but also quoting ordinary characters including '\"' and '\\'
which are respectively quoted '"' and '\', and to deal also with
C escape sequences including '\t' for TAB and '\n' for LF.

Add esc_path subroutine for gitweb quoting and HTML escaping filenames
(currently it does equivalent of ls' --hide-control-chars, which means
showing undisplayable characters (including '\n' and '\t') as '?'
(question mark) character, and use 'span' element with cntrl CSS class
to help rendering them differently.

Convert gitweb to use esc_path correctly to print pathnames.

Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.css
gitweb.perl
This page took 0.205622 seconds and 4 git commands to generate.