summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/rp.pl6
-rw-r--r--templates/demo/balance_sheet.html5
-rw-r--r--templates/demo/income_statement.html5
3 files changed, 8 insertions, 8 deletions
diff --git a/bin/rp.pl b/bin/rp.pl
index 900b47be..e81f199c 100644
--- a/bin/rp.pl
+++ b/bin/rp.pl
@@ -1057,9 +1057,8 @@ sub generate_income_statement {
# setup variables for the form
my @vars = qw(company address businessnumber);
for (@vars) { $form->{$_} = $myconfig{$_} }
- ##SC: START HTML
+ ##SC: The escaped form will be converted in-template
$form->{address} =~ s/\\n/<br>/g;
- ##SC: END HTML
my $template = LedgerSMB::Template->new(
@@ -1107,9 +1106,8 @@ sub generate_balance_sheet {
for (qw(company address businessnumber nativecurr login)) {
$form->{$_} = $myconfig{$_};
}
- ##SC: START HTML
+ ##SC: The escaped form will be converted in-template
$form->{address} =~ s/\\n/<br>/g;
- ##SC: END HTML
$form->{templates} = $myconfig{templates};
diff --git a/templates/demo/balance_sheet.html b/templates/demo/balance_sheet.html
index e21fe7b3..23430e9b 100644
--- a/templates/demo/balance_sheet.html
+++ b/templates/demo/balance_sheet.html
@@ -56,8 +56,9 @@ END ?>
<body>
<h2 align="center">
-<?lsmb company ?>
-<br /><?lsmb address ?>
+<?lsmb company -?>
+<?lsmb #SC: This is to convert a line termination indicator to a real br ?>
+<br /><?lsmb address.split('&lt;br&gt;').join('<br />') ?>
<br /><?lsmb text('Balance Sheet') ?>
<br /><?lsmb text('as at [_1]', this_period) ?>
diff --git a/templates/demo/income_statement.html b/templates/demo/income_statement.html
index 03043ae6..0198f4c5 100644
--- a/templates/demo/income_statement.html
+++ b/templates/demo/income_statement.html
@@ -56,8 +56,9 @@ END ?>
<body>
<h2 align="center">
-<?lsmb company ?>
-<br /><?lsmb address ?>
+<?lsmb company -?>
+<?lsmb #SC: This is to convert a line termination indicator to a real br ?>
+<br /><?lsmb address.split('&lt;br&gt;').join('<br />') ?>
<br /><?lsmb text('Income Statement') ?>
<br /><?lsmb text('for Period') ?>