X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/85ab58eb1bbdb3fc723bb3ab30e15e150e62556d..505322c4b9b99beb3c0f1246edbfc54ff3a36790:/SL/Controller/RequirementSpecOrder.pm diff --git a/SL/Controller/RequirementSpecOrder.pm b/SL/Controller/RequirementSpecOrder.pm index 07d3e0603..2bfb1cffd 100644 --- a/SL/Controller/RequirementSpecOrder.pm +++ b/SL/Controller/RequirementSpecOrder.pm @@ -256,11 +256,13 @@ sub create_order_item { if (!$section->{keep_description}) { $description = '<%fb_number%> <%title%>' unless $description =~ m{<%}; - $longdescription = '<%description%>' unless $longdescription =~ m{<%}; + $longdescription = '<%description%>' unless $longdescription =~ m{<%}; - foreach my $field (\$description, \$longdescription) { - $$field =~ s{<% (.+?) %>}{ $section->can($1) ? $section->$1 : '<' . t8('Invalid variable #1', $1) . '>' }egx; - } + $description =~ s{<% (.+?) %>}{ $section->can($1) ? $section->$1 : '<' . t8('Invalid variable #1', $1) . '>' }egx; + $longdescription =~ s{\<\% description \%\>}{!!!!DESCRIPTION!!!!}gx; + $longdescription =~ s{<[pP]> !!!!DESCRIPTION!!!! }{!!!!DESCRIPTION!!!!}gx; + $longdescription =~ s{\<\% (.+?) \%\>}{ $section->can($1) ? $::locale->quote_special_chars('HTML', $section->$1 // '') : '<' . t8('Invalid variable #1', $1) . '>' }egx; + $longdescription =~ s{!!!!DESCRIPTION!!!!}{ $section->description // '' }egx; } $item->assign_attributes(