X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FMason.pm;h=de97a1915b2232f635e7f0e4151bcc067a6c517d;hb=22a1feb55c4bb705064a04646ff5c321b8112ce1;hp=773261f0fd1ffad76493ed09e94f7ce2827ccaf2;hpb=8cbe016ac2c28cd209c48f053f361573368e7988;p=freeside.git diff --git a/FS/FS/Mason.pm b/FS/FS/Mason.pm index 773261f0f..de97a1915 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; @@ -64,6 +64,7 @@ if ( -e $addl_handler_use_file ) { use DateTime; use DateTime::Format::Strptime; use FS::Misc::DateTime qw( parse_datetime ); + use FS::Misc::Geo qw( get_censustract get_district ); use Lingua::EN::Inflect qw(PL); Lingua::EN::Inflect::classical names=>0; #Categorys use Tie::IxHash; @@ -114,7 +115,6 @@ if ( -e $addl_handler_use_file ) { #selectlayers.html use Locale::Country; use Business::US::USPS::WebTools::AddressStandardization; - use HTML::GoogleMaps; use Geo::GoogleEarth::Pluggable; use LWP::UserAgent; use Storable qw( nfreeze thaw ); @@ -303,6 +303,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 +550,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 +577,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(