From 6c5c1c36fa682244c355f6c06808ec715f0a2baa Mon Sep 17 00:00:00 2001 From: einhverfr Date: Thu, 26 Apr 2007 20:28:38 +0000 Subject: 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 --- LedgerSMB/Locale.pm | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'LedgerSMB/Locale.pm') 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; -- cgit v1.2.3