Code

gitweb: Better git-unquoting and gitweb-quoting of pathnames
authorJakub Narebski <jnareb@gmail.com>
Wed, 8 Nov 2006 10:48:56 +0000 (11:48 +0100)
committerJunio C Hamano <junkio@cox.net>
Wed, 8 Nov 2006 18:38:48 +0000 (10:38 -0800)
commit403d0906e9876871a7913554be4caa93f21f1d15
treeb38de4e8d6a289f0ca31e728d265451158d95057
parent83ee94c12ca16ef020f3d71eda34b6559ed6dc67
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 <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.css
gitweb/gitweb.perl