X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FTemplate%2FPlugin%2FHTMLFixes.pm;h=fad69932a9fe5ff4f440603fc8d08fbf463c136b;hb=824f9ddf5ac3c5d8f46fa8a3bcd49456aa9f0e22;hp=3f328a8424b584fcd8a8d8d891b401d3796ca8a4;hpb=e257fa36cfb1ff40a451d8e2ce1f71e477701640;p=kivitendo-erp.git diff --git a/SL/Template/Plugin/HTMLFixes.pm b/SL/Template/Plugin/HTMLFixes.pm index 3f328a842..fad69932a 100644 --- a/SL/Template/Plugin/HTMLFixes.pm +++ b/SL/Template/Plugin/HTMLFixes.pm @@ -12,16 +12,16 @@ use Encode; # Replacement for Template::Plugin::HTML::url. -# Strings in Lx-Office are stored in Perl's internal encoding but have +# Strings in kivitendo are stored in Perl's internal encoding but have # to be output as UTF-8. A normal regex replace doesn't do that # creating invalid UTF-8 characters upon URL-unescaping. # The only addition is the "Encode::encode()" line. - +no warnings 'redefine'; sub url { my ($self, $text) = @_; return undef unless defined $text; - $text = Encode::encode('utf-8-strict', $text) if $::locale && $::locale->is_utf8; + $text = Encode::encode('utf-8-strict', $text); $text =~ s/([^a-zA-Z0-9_.-])/uc sprintf("%%%02x",ord($1))/eg; return $text; }