From 7fa54a9505c11529758016867fbdcdfe536bcd4d Mon Sep 17 00:00:00 2001 From: short <> Date: Sat, 10 Sep 2005 07:30:29 +0000 Subject: [PATCH] +Workaround &CGI::escapeHTML workaround of some browsers breaking: utf-8 --- Web.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Web.pm b/Web.pm index 0616f94..872224e 100644 --- a/Web.pm +++ b/Web.pm @@ -97,6 +97,7 @@ BEGIN use WebConfig; # see also below: Wuse 'WebConfig'; require CGI; # for &escapeHTML +CGI::charset("utf-8"); # Prevent &CGI::escapeHTML breaking utf-8 like \xC4\x9B eq \x{11B} require Image::Size; # for &imgsize use File::Basename; # &basename use Carp qw(cluck confess); @@ -253,6 +254,7 @@ my($text)=@_; # Use &eval to prevent: Global $r object is not available. Set:\n\tPerlOptions +GlobalRequest\nin ... # CGI requires valid "r": check it beforehand here. confess "Calling dynamic URL generator from a static code" if !eval { Apache2::RequestUtil->request(); }; + # See also somewhere else: CGI::charset("utf-8"); return CGI::escapeHTML($text); } -- 1.8.3.1