X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FForm.pm;h=f02c25abe26ff9d8fdb42c4dcfb7d314df90ae04;hb=d8a50ddefe779afb7c1f4f6299439b0757d4540b;hp=2647cec37a1c4abc785950bd88d5e769dee3c0f7;hpb=6cf3f7762efd40bee49a2b8f11bb4ab6915d9071;p=kivitendo-erp.git diff --git a/SL/Form.pm b/SL/Form.pm index 2647cec37..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; @@ -56,7 +57,7 @@ use SL::User; use Template; use URI; use List::Util qw(first max min sum); -use List::MoreUtils qw(any); +use List::MoreUtils qw(any apply); use strict; @@ -268,7 +269,7 @@ sub new { #$self->{version} = "2.6.1"; # Old hardcoded but secure style open VERSION_FILE, "VERSION"; # New but flexible code reads version from VERSION-file $self->{version} = ; - close VERSION_FILE; + close VERSION_FILE; $self->{version} =~ s/[^0-9A-Za-z\.\_\-]//g; # only allow numbers, letters, points, underscores and dashes. Prevents injecting of malicious code. $main::lxdebug->leave_sub(); @@ -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); @@ -475,7 +477,7 @@ sub info { print qq|

$msg

- + - + |; @@ -672,9 +674,9 @@ sub header { | if $self->{"fokus"}; - # if there is a title, we put some JavaScript in to the page, wich writes a + # if there is a title, we put some JavaScript in to the page, wich writes a # meaningful title-tag for our frameset. - my $title_hack; + my $title_hack; if ($self->{"title"}){ $title_hack = qq| |; } - + #Set Calendar my $jsscript = ""; if ($self->{jsscript} == 1) { @@ -723,11 +725,10 @@ sub header { $ajax $fokus $title_hack - + -