summaryrefslogtreecommitdiff
path: root/FS/FS/Maketext.pm
diff options
context:
space:
mode:
authorlevinse <levinse>2011-05-18 00:33:34 +0000
committerlevinse <levinse>2011-05-18 00:33:34 +0000
commit781f1fd28bb3dbe75fd24c627792618409da7143 (patch)
tree085f37c4f1b6d41847cf61fc4cc4e7e813aaaef4 /FS/FS/Maketext.pm
parent93519f9371b41ded713a93fba031ed7a361be04c (diff)
internationalization/localization, RT12515
Diffstat (limited to 'FS/FS/Maketext.pm')
-rw-r--r--FS/FS/Maketext.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/FS/FS/Maketext.pm b/FS/FS/Maketext.pm
index 319fb1d..965c999 100644
--- a/FS/FS/Maketext.pm
+++ b/FS/FS/Maketext.pm
@@ -4,8 +4,9 @@ use base qw( Exporter );
use FS::CurrentUser;
use FS::Conf;
use FS::L10N;
+use HTML::Entities qw( encode_entities );
-our @EXPORT_OK = qw( mt );
+our @EXPORT_OK = qw( mt emt );
our $lh;
@@ -14,6 +15,11 @@ sub mt {
$lh->maketext(@_);
}
+# HTML-escaped version of mt()
+sub emt {
+ encode_entities(mt(@_));
+}
+
sub lh {
my $locale = $FS::CurrentUser::CurrentUser->option('locale')
|| FS::Conf->new->config('locale')