internationalization/localization, RT12515
[freeside.git] / FS / FS / Maketext.pm
index 319fb1d..965c999 100644 (file)
@@ -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')