]> git.deb.at Git - pkg/blosxom.git/commitdiff
Unescape url returned from CGI::url to match PATH_INFO escaping.
authorGavin Carr <gonzai@users.sourceforge.net>
Wed, 26 Mar 2008 19:02:31 +0000 (19:02 +0000)
committerGavin Carr <gonzai@users.sourceforge.net>
Wed, 26 Mar 2008 19:02:31 +0000 (19:02 +0000)
ChangeLog
blosxom.cgi

index a2a26796fa2d595debc1f74142eb1646efc985ba..5a05b0c9dd48e8ca4f23cf61c7d580d221101090 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
 v2.0.3
+    * unescape url returned from CGI.pm to match PATH_INFO escaping
     * redo path_info handling with much stricter date tests
     * added support for multiple plugin directories using $plugin_path
        * changed plugin loading to use @INC instead of hardcoded 
index ee9bebc03717f46c203afef2366d0926221fe88f..29b9a540d4ebf6022a0e38a47ba1cb9de0f799f8 100755 (executable)
@@ -144,6 +144,8 @@ my $fh = new FileHandle;
 
 # Use the stated preferred URL or figure it out automatically
 $url ||= url( -path_info => 1 );
+# Unescape %XX hex codes (from URI::Escape::uri_unescape)
+$url =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;      
 $url =~ s/^included:/http:/ if $ENV{SERVER_PROTOCOL} eq 'INCLUDED';
 
 # NOTE: Since v3.12, it looks as if CGI.pm misbehaves for SSIs and