X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FMason.pm;h=9bd0cc3058d89aafa8021cec9d718b4172dd3339;hb=85e677b86fc37c54e6de2b06340351a28f5a5916;hp=99cc1cd6f875cee8b960c3bb99a0d8149d6ae5b3;hpb=ee2ee290c82013f870e2b23e4235e70998e59ee1;p=freeside.git diff --git a/FS/FS/Mason.pm b/FS/FS/Mason.pm index 99cc1cd6f..9bd0cc305 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,12 +115,14 @@ if ( -e $addl_handler_use_file ) { #selectlayers.html use Locale::Country; use Business::US::USPS::WebTools::AddressStandardization; + use Geo::GoogleEarth::Pluggable; use LWP::UserAgent; use Storable qw( nfreeze thaw ); use FS; 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 @@ -299,6 +302,16 @@ if ( -e $addl_handler_use_file ) { use FS::rate_tier_detail; use FS::radius_attr; 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; + use FS::ftp_target; + use FS::quotation; + use FS::quotation_pkg; + use FS::quotation_pkg_discount; # Sammath Naur if ( $FS::Mason::addl_handler_use ) { @@ -542,6 +555,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]}. "'"; }; @@ -567,11 +582,13 @@ 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( default_escape_flags => 'h', - allow_globals => [qw(%session)], + allow_globals => [qw(%session $DECODED_ARGS)], ), );