From c6c877266db02ffaf6d9448d180286954b865b4e Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 15 Jan 2014 14:59:16 +0100 Subject: [PATCH] =?utf8?q?Wandlung=20Pflichtenheft=20->=20Angebot/Auftrag:?= =?utf8?q?=20HTML=20in=20Langtext=20erm=C3=B6glichen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/RequirementSpecOrder.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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( -- 2.20.1