file_name => $self->{IN},
form => $self,
myconfig => $myconfig,
- userspath => $userspath);
+ userspath => $userspath,
+ %{ $self->{TEMPLATE_DRIVER_OPTIONS} || {} });
# Copy the notes from the invoice/sales order etc. back to the variable "notes" because that is where most templates expect it to be.
$self->{"notes"} = $self->{ $self->{"formname"} . "notes" };
$self->{$_} = $params{$_} for keys %params;
+ $self->{variable_content_types} ||= {};
+ $self->{variable_content_types}->{$_} = lc $self->{variable_content_types}->{$_} for keys %{ $self->{variable_content_types} };
+ $self->{default_variable_content_type} = 'text';
+
$self->{error} = undef;
$self->{quot_re} = '"';
my $value = $self->_get_loop_variable($var, 0, @indices);
$value = $form->parse_amount({ numberformat => $::myconfig{output_numberformat} || $::myconfig{numberformat} }, $value) if $options{NOFORMAT};
- $value = $self->format_string($value) unless $options{NOESCAPE};
+ $value = $self->format_string($value, $var) unless $options{NOESCAPE};
substr($text, $tag_pos, $tag_len, $value);
}