X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FMason.pm;h=b0f20ec6524079f6eab57d522d38af5a79221835;hb=daa09251fec52517b630b3f6935041dc7c795f90;hp=6cc32bd0439c2ad43d2df8b91ba4619b532a10e0;hpb=5e76ae4e7a11bd28478ed68eef8124fb7ff0767c;p=freeside.git diff --git a/FS/FS/Mason.pm b/FS/FS/Mason.pm index 6cc32bd04..b0f20ec65 100644 --- a/FS/FS/Mason.pm +++ b/FS/FS/Mason.pm @@ -55,7 +55,7 @@ if ( -e $addl_handler_use_file ) { #use CGI::Carp qw(fatalsToBrowser); use CGI::Cookie; - use List::Util qw( max min ); + use List::Util qw( max min sum ); use Data::Dumper; use Date::Format; use Time::Local; @@ -122,6 +122,7 @@ if ( -e $addl_handler_use_file ) { use FS::UID qw( getotaker dbh datasrc driver_name ); use FS::Record qw( qsearch qsearchs fields dbdef str2time_sql str2time_sql_closing + midnight_sql ); use FS::Conf; use FS::CGI qw(header menubar table itable ntable idiot @@ -303,6 +304,10 @@ if ( -e $addl_handler_use_file ) { use FS::discount_plan; use FS::tower; use FS::tower_sector; + use FS::sales; + use FS::access_groupsales; + use FS::contact_class; + use FS::part_svc_class; # Sammath Naur if ( $FS::Mason::addl_handler_use ) { @@ -546,6 +551,8 @@ sub mason_interps { ${$_[0]} =~ s/(['\\])/\\$1/g; ${$_[0]} =~ s/\r/\\r/g; ${$_[0]} =~ s/\n/\\n/g; + # prevent premature termination of the script + ${$_[0]} =~ s[][<\\/script>]ig; ${$_[0]} = "'". ${$_[0]}. "'"; }; @@ -571,6 +578,8 @@ sub mason_interps { [ 'freeside' => '%%%FREESIDE_DOCUMENT_ROOT%%%' ], ], escape_flags => { 'h' => \&RT::Interface::Web::EscapeUTF8, + 'u' => \&RT::Interface::Web::EscapeURI, + 'j' => \&RT::Interface::Web::EscapeJS, 'js_string' => $js_string_sub, }, compiler => HTML::Mason::Compiler::ToObject->new(