]> Lady’s Gitweb - Gitweb/commit
gitweb: Fix handling of whitespace in generated links
authorJakub Narebski <redacted>
Tue, 14 Dec 2010 15:54:31 +0000 (16:54 +0100)
committerLady <redacted>
Mon, 6 Apr 2026 04:51:30 +0000 (00:51 -0400)
commit7d13b118d884ee26d141ea545aca0b70d9baa0fee873234d6f5e385af21bb1dd
treecdce7405b39bc1828985b8a72e97d243df9dd09613b100290e06e661e05f03f8
parent96bb05bd3dd7fca1991eb9c4e66ffef2875cafcf828505ed492aa1062a274eaa
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl
This page took 0.29178 seconds and 4 git commands to generate.