From: Moritz Bunkus Date: Wed, 15 Jan 2014 13:59:16 +0000 (+0100) Subject: Wandlung Pflichtenheft -> Angebot/Auftrag: HTML in Langtext ermöglichen X-Git-Tag: release-3.2.0beta~467^2~43 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=c6c877266db02ffaf6d9448d180286954b865b4e;p=kivitendo-erp.git Wandlung Pflichtenheft -> Angebot/Auftrag: HTML in Langtext ermöglichen --- 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(