[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5747] branches/1.3
- Subject: SF.net SVN: ledger-smb:[5747] branches/1.3
- From: ..hidden..
- Date: Sat, 4 May 2013 10:01:37 +0000
Revision: 5747
http://sourceforge.net/p/ledger-smb/code/5747
Author: einhverfr
Date: 2013-05-04 10:01:35 +0000 (Sat, 04 May 2013)
Log Message:
-----------
PDF template handling fixes merged from trunk
Modified Paths:
--------------
branches/1.3/Changelog
branches/1.3/LedgerSMB/Template/LaTeX.pm
Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog 2013-05-04 07:53:57 UTC (rev 5746)
+++ branches/1.3/Changelog 2013-05-04 10:01:35 UTC (rev 5747)
@@ -8,6 +8,7 @@
* Fixed multiple repeat entries in chart of accounts drop down (Nick P, 812)
* Fixed transaction list empty if searched by creditor name (Nick P, 806)
* Fixed cash transfer enforces ticked 'FX' boxes (Nick P, 802)
+* Fixed extra newline-related errors in tex template engine (Chris T)
Nick P is Nick Prater
Modified: branches/1.3/LedgerSMB/Template/LaTeX.pm
===================================================================
--- branches/1.3/LedgerSMB/Template/LaTeX.pm 2013-05-04 07:53:57 UTC (rev 5746)
+++ branches/1.3/LedgerSMB/Template/LaTeX.pm 2013-05-04 10:01:35 UTC (rev 5747)
@@ -121,11 +121,29 @@
if (defined $vars){
$vars =~ s/([&\$\\_<>~^#\%\{\}â])/$escapes{$1}/g;
+ $vars =~ s/[ââ]/---/g;
+ $vars =~ s/\xa0/ /g;
+ $vars =~ s/\x91/'/g;
+ $vars =~ s/\x92/'/g;
+ $vars =~ s/\x93/"/g;
+ $vars =~ s/\x94/"/g;
+ $vars =~ s/\x97/-/g;
+ $vars =~ s/\xab/"/g;
+ $vars =~ s/\xa9//g;
+ $vars =~ s/\xae//g;
+ $vars =~ s/\x{2018}/'/g;
+ $vars =~ s/\x{2019}/'/g;
+ $vars =~ s/\x{201C}/"/g;
+ $vars =~ s/\x{201D}/"/g;
+ $vars =~ s/\x{2022}//g;
+ $vars =~ s/\x{2013}/-/g;
+ $vars =~ s/\x{2014}/-/g;
+ $vars =~ s/\x{2122}//g;
$vars =~ s/â/--/g;
- $vars =~ s/[ââ]/---/g;
$vars =~ s/"(.*)"/``$1''/gs;
$vars =~ s/\n/\\\\/gm;
- $vars =~ s/\\\\\\\\/\n\n/g;
+ $vars =~ s/(\\)*$//g;
+ $vars =~ s/(\\\\){2,}/\n\n/g;
}
return $vars;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.