[open-ils-commits] r1251 - conifer/branches/rel_1_6_1/src/perlmods/OpenILS/Application/Trigger (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Feb 28 23:38:42 EST 2011
Author: dbs
Date: 2011-02-28 23:38:40 -0500 (Mon, 28 Feb 2011)
New Revision: 1251
Modified:
conifer/branches/rel_1_6_1/src/perlmods/OpenILS/Application/Trigger/Reactor.pm
Log:
Backport the email header escape helper for TT
Modified: conifer/branches/rel_1_6_1/src/perlmods/OpenILS/Application/Trigger/Reactor.pm
===================================================================
--- conifer/branches/rel_1_6_1/src/perlmods/OpenILS/Application/Trigger/Reactor.pm 2011-03-01 04:38:12 UTC (rev 1250)
+++ conifer/branches/rel_1_6_1/src/perlmods/OpenILS/Application/Trigger/Reactor.pm 2011-03-01 04:38:40 UTC (rev 1251)
@@ -1,5 +1,6 @@
package OpenILS::Application::Trigger::Reactor;
use strict; use warnings;
+use Encode;
use Template;
use DateTime;
use DateTime::Format::ISO8601;
@@ -43,6 +44,13 @@
return $str;
},
+ # encode email headers in UTF-8, per RFC2231
+ escape_email_header => sub {
+ my $str = shift;
+ $str = encode("MIME-Header", $str);
+ return $str;
+ },
+
# returns the calculated user locale
get_user_locale => sub {
my $user_id = shift;
More information about the open-ils-commits
mailing list