From: Jakub Narebski Date: Tue, 14 Dec 2010 15:54:31 +0000 (+0100) Subject: gitweb: Fix handling of whitespace in generated links X-Git-Url: https://git.ladys.computer/Gitweb/commitdiff_plain/7d13b118d884ee26d141ea545aca0b70d9baa0fee873234d6f5e385af21bb1dd?hp=7d13b118d884ee26d141ea545aca0b70d9baa0fee873234d6f5e385af21bb1dd gitweb: Fix handling of whitespace in generated links When creating path_info part of link, don't encode space as '+', because while $cgi->param('foo') translates '+' in query param to ' ', neither $ENV{'PATH_INFO'} nor $cgi->path_info() do. This fixes the issue with pathnames with embedded whitespace and $feature{'pathinfo'} / path_info links. It is done by using newly introduced esc_path_info() instead of esc_url() in href() subroutine. Also while links are more clear not escaping space (' ') characters in generated links, the trailing space must be URI-encoded, otherwise would get discarded. Issue noticed thanks to John 'Warthog9' Hawley. Signed-off-by: Jakub Narebski Signed-off-by: Junio C Hamano ---