[PATCH 1/2] gitweb: dirty patch to make url rewriting involving '+' working
- From
Sylvain Rabot <sylvain@abstraction.fr>
- Date
- Mar 29, 2010, 22:34 UTC
- Message-ID
- <1269902043-11134-2-git-send-email-sylvain@abstraction.fr>
- In-Reply-To
- <1269902043-11134-1-git-send-email-sylvain@abstraction.fr>
CGI::url method replaces '+' character by '%20', this patch reverts this behavior to make url rewriting involving '+' in the base url working
Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr> --- gitweb/gitweb.perl | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index a2d2283..486996e 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -33,6 +33,10 @@ our $version = "++GIT_VERSION++"; our $my_url = $cgi->url(); our $my_uri = $cgi->url(-absolute => 1); +# dirty patch to make url rewriting with '+' character working +$my_url =~ s/(.*)%20(.*)/$1+$2/g; +$my_uri =~ s/(.*)%20(.*)/$1+$2/g; + # Base URL for relative URLs in gitweb ($logo, $favicon, ...), # needed and used only for URLs with nonempty PATH_INFO our $base_url = $my_url;
-- 1.7.0.3