From: Moritz Bunkus Date: Mon, 13 Dec 2010 16:08:35 +0000 (+0100) Subject: Beim URL-Escapen vom internen Encoding nach UTF-8 wandeln, sofern benötigt X-Git-Tag: release-2.6.2beta1~69^2~4 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=753b82ffa2294d6aba8fa64e9179c4323c4ad35d;p=kivitendo-erp.git Beim URL-Escapen vom internen Encoding nach UTF-8 wandeln, sofern benötigt --- diff --git a/SL/Form.pm b/SL/Form.pm index f3fe6e5d9..f02c25abe 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -42,6 +42,7 @@ use Data::Dumper; use CGI; use CGI::Ajax; use Cwd; +use Encode; use IO::File; use SL::Auth; use SL::Auth::DB; @@ -379,6 +380,7 @@ sub escape { my ($self, $str) = @_; + $str = Encode::encode('utf-8-strict', $str) if $::locale->is_utf8; $str =~ s/([^a-zA-Z0-9_.-])/sprintf("%%%02x", ord($1))/ge; $main::lxdebug->leave_sub(2);