summaryrefslogtreecommitdiff
path: root/LedgerSMB/Locale.pm
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-26 20:28:38 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-26 20:28:38 +0000
commit6c5c1c36fa682244c355f6c06808ec715f0a2baa (patch)
tree632efc981a5735f7b8d424a680469b71597dd495 /LedgerSMB/Locale.pm
parent6a118bd31a09a9b8aaabd84f8876952e1cdd6459 (diff)
Merging bugfixes from current branches/1.2
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1105 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/Locale.pm')
-rw-r--r--LedgerSMB/Locale.pm14
1 files changed, 6 insertions, 8 deletions
diff --git a/LedgerSMB/Locale.pm b/LedgerSMB/Locale.pm
index 122794b4..c89fbef0 100644
--- a/LedgerSMB/Locale.pm
+++ b/LedgerSMB/Locale.pm
@@ -27,6 +27,7 @@
package LedgerSMB::Locale;
use base 'Locale::Maketext';
use Locale::Maketext::Lexicon;
+use HTML::Entities;
use Encode;
Locale::Maketext::Lexicon->import(
@@ -39,7 +40,7 @@ Locale::Maketext::Lexicon->import(
sub text {
my ( $self, $text, @params ) = @_;
- return $self->maketext( $text, @params );
+ return encode_entities( $self->maketext( $text, @params ) );
}
##sub date {
@@ -119,10 +120,6 @@ sub date {
$mm = substr( "0$mm", -2 );
$longdate = "$yy$spc$mm$spc$dd";
- if ( defined $longformat ) {
- $longdate = &text( $self, $longmonth[ --$mm ] ) . " $dd $yy";
- }
-
}
else {
@@ -131,10 +128,11 @@ sub date {
$mm = substr( "0$mm", -2 );
$longdate = "$mm$spc$dd$spc$yy";
- if ( defined $longformat ) {
- $longdate = &text( $self, $longmonth[ --$mm ] ) . " $dd $yy";
- }
}
+ if ( defined $longformat ) {
+ $longdate = &text( $self, $longmonth[ --$mm ] ) . " $dd $yy";
+ }
+ $longdate;
}
1;