[freeside-commits] freeside/FS/FS Mason.pm,1.46,1.47
Ivan,,,
ivan at wavetail.420.am
Tue Jul 20 19:06:46 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv6283/FS/FS
Modified Files:
Mason.pm
Log Message:
fix calendar popup for weirdly named fields in RT, for the quotes around custom field bullshit, RT#8449
Index: Mason.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Mason.pm,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -w -d -r1.46 -r1.47
--- Mason.pm 15 Jul 2010 21:46:31 -0000 1.46
+++ Mason.pm 21 Jul 2010 02:06:44 -0000 1.47
@@ -480,15 +480,17 @@
my $html_defang = new HTML::Defang (%defang_opts);
- my $fs_interp = new HTML::Mason::Interp (
- %interp,
- escape_flags => { 'js_string' => sub {
+ my $js_string_sub = sub {
#${$_[0]} =~ s/(['\\\n])/'\\'.($1 eq "\n" ? 'n' : $1)/ge;
${$_[0]} =~ s/(['\\])/\\$1/g;
${$_[0]} =~ s/\r/\\r/g;
${$_[0]} =~ s/\n/\\n/g;
${$_[0]} = "'". ${$_[0]}. "'";
- },
+ };
+
+ my $fs_interp = new HTML::Mason::Interp (
+ %interp,
+ escape_flags => { 'js_string' => $js_string_sub,
'defang' => sub {
${$_[0]} = $html_defang->defang(${$_[0]});
},
@@ -500,7 +502,9 @@
my $rt_interp = new HTML::Mason::Interp (
%interp,
- escape_flags => { 'h' => \&RT::Interface::Web::EscapeUTF8 },
+ escape_flags => { 'h' => \&RT::Interface::Web::EscapeUTF8,
+ 'js_string' => $js_string_sub,
+ },
compiler => HTML::Mason::Compiler::ToObject->new(
default_escape_flags => 'h',
allow_globals => [qw(%session)],
More information about the freeside-commits
mailing list