~woffs/wcm

b96099b341116b8b1f1e7c080a4477b40caa77cc — Frank Doepper 10 years ago 5e45010 20120408
fix safari urlencoding
1 files changed, 2 insertions(+), 2 deletions(-)

M index.pl
M index.pl => index.pl +2 -2
@@ 4,7 4,7 @@
# http://woffs.de/WCM
# <wcm@woffs.de>
#
# Version 20110520
# Version 20120408
# 
# © WofFS 2010
# License: CC-BY-SA 3.0


@@ 134,8 134,8 @@ alarm 180; # max. seconds
# which page requested
$current=$1 if $ENV{'QUERY_STRING'} and $ENV{'QUERY_STRING'}=~/^page=([^&]*)(&.*)?$/;
my $clen=$2?length($2):0;
$current=~s/%([0-9A-F]{2})/sprintf("%c",hex($1))/gei; # urldecode
$clen+=length($current);
$current=~s/%([0-9A-F]{2})/sprintf("%c",hex($1))/gei; # urldecode
$current=~s,/*$,,;                         # strip trailing /
($bcurrent=$current)=~s,.*/,,;