[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [1842] trunk
- Subject: SF.net SVN: ledger-smb: [1842] trunk
- From: ..hidden..
- Date: Fri, 02 Nov 2007 14:50:28 -0700
Revision: 1842
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1842&view=rev
Author: tetragon
Date: 2007-11-02 14:50:27 -0700 (Fri, 02 Nov 2007)
Log Message:
-----------
Handle <br> and $form->address in templates
Modified Paths:
--------------
trunk/bin/rp.pl
trunk/templates/demo/balance_sheet.html
trunk/templates/demo/income_statement.html
Modified: trunk/bin/rp.pl
===================================================================
--- trunk/bin/rp.pl 2007-11-02 17:35:06 UTC (rev 1841)
+++ trunk/bin/rp.pl 2007-11-02 21:50:27 UTC (rev 1842)
@@ -1057,9 +1057,8 @@
# 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 @@
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};
Modified: trunk/templates/demo/balance_sheet.html
===================================================================
--- trunk/templates/demo/balance_sheet.html 2007-11-02 17:35:06 UTC (rev 1841)
+++ trunk/templates/demo/balance_sheet.html 2007-11-02 21:50:27 UTC (rev 1842)
@@ -56,8 +56,9 @@
<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('<br>').join('<br />') ?>
<br /><?lsmb text('Balance Sheet') ?>
<br /><?lsmb text('as at [_1]', this_period) ?>
Modified: trunk/templates/demo/income_statement.html
===================================================================
--- trunk/templates/demo/income_statement.html 2007-11-02 17:35:06 UTC (rev 1841)
+++ trunk/templates/demo/income_statement.html 2007-11-02 21:50:27 UTC (rev 1842)
@@ -56,8 +56,9 @@
<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('<br>').join('<br />') ?>
<br /><?lsmb text('Income Statement') ?>
<br /><?lsmb text('for Period') ?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.