projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'after-262'
[kivitendo-erp.git]
/
SL
/
Form.pm
diff --git
a/SL/Form.pm
b/SL/Form.pm
index
a753dbc
..
efcad4a
100644
(file)
--- a/
SL/Form.pm
+++ b/
SL/Form.pm
@@
-385,7
+385,7
@@
sub escape {
my ($self, $str) = @_;
$str = Encode::encode('utf-8-strict', $str) if $::locale->is_utf8;
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;
+ $str =~ s/([^a-zA-Z0-9_.
:
-])/sprintf("%%%02x", ord($1))/ge;
$main::lxdebug->leave_sub(2);
$main::lxdebug->leave_sub(2);
@@
-401,6
+401,7
@@
sub unescape {
$str =~ s/\\$//;
$str =~ s/%([0-9a-fA-Z]{2})/pack("c",hex($1))/eg;
$str =~ s/\\$//;
$str =~ s/%([0-9a-fA-Z]{2})/pack("c",hex($1))/eg;
+ $str = Encode::decode('utf-8-strict', $str) if $::locale->is_utf8;
$main::lxdebug->leave_sub(2);
$main::lxdebug->leave_sub(2);
@@
-1252,6
+1253,7
@@
sub parse_template {
}
map { $self->{"${_}"} = $myconfig->{$_}; } qw(co_ustid);
}
map { $self->{"${_}"} = $myconfig->{$_}; } qw(co_ustid);
+ map { $self->{"myconfig_${_}"} = $myconfig->{$_} } grep { $_ ne 'dbpasswd' } keys %{ $myconfig };
$self->{copies} = 1 if (($self->{copies} *= 1) <= 0);
$self->{copies} = 1 if (($self->{copies} *= 1) <= 0);
@@
-1358,6
+1360,7
@@
sub parse_template {
my $numbytes = (-s $self->{tmpfile});
open(IN, $self->{tmpfile})
or $self->error($self->cleanup . "$self->{tmpfile} : $!");
my $numbytes = (-s $self->{tmpfile});
open(IN, $self->{tmpfile})
or $self->error($self->cleanup . "$self->{tmpfile} : $!");
+ binmode IN;
$self->{copies} = 1 unless $self->{media} eq 'printer';
$self->{copies} = 1 unless $self->{media} eq 'printer';