--- CommentPlugin.old 2004-10-27 00:17:14.000000000 +0200 +++ CommentPlugin.pm 2004-12-29 23:42:57.000000000 +0100 @@ -8,7 +8,7 @@ use vars qw( $initialised $VERSION $firstCall $pluginName $testing ); BEGIN { - $VERSION = 3.008; + $VERSION = 3.009; $pluginName = "CommentPlugin"; $firstCall = 0; $testing = 0; @@ -43,8 +43,17 @@ my $query = TWiki::Func::getCgiQuery(); return unless( defined( $query )); my $action = $query->param( 'comment_action' ) || ""; + # Handle UTF8 chaos in $query->path_info(), NielsKoldso 29/12-04 + # Btw: I don't understand why this check is done, please rename $query_path_info_ok to reflect why + my $query_path_info_ok = 0; + { + my($empty, $web, $topic) = split(/\//,$query->path_info(),3); + ($web, $topic) = TWiki::convertUtf8URLtoSiteCharset($web,$topic); + $query_path_info_ok = (!length($empty)) && ($_[2] eq $web) && ($_[1] eq $topic); + } if ( defined( $action ) && $action eq "save" - && ( $testing || $query->path_info() eq "/$_[2]/$_[1]" ) +# && ( $testing || $query->path_info() eq "/$_[2]/$_[1]" ) # replaced because of UTF8 problems, NielsKoldso 29/12-04 + && ( $testing || $query_path_info_ok ) ) { # $firstCall ensures we only save once, ever. if ( $firstCall ) {