projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rt 4.0.6
[freeside.git]
/
FS
/
FS
/
Mason.pm
diff --git
a/FS/FS/Mason.pm
b/FS/FS/Mason.pm
index
6e3d7c9
..
f6ad714
100644
(file)
--- 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 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;
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 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;
use Lingua::EN::Inflect qw(PL);
Lingua::EN::Inflect::classical names=>0; #Categorys
use Tie::IxHash;
@@
-114,6
+115,7
@@
if ( -e $addl_handler_use_file ) {
#selectlayers.html
use Locale::Country;
use Business::US::USPS::WebTools::AddressStandardization;
#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 LWP::UserAgent;
use Storable qw( nfreeze thaw );
use FS;
@@
-140,7
+142,7
@@
if ( -e $addl_handler_use_file ) {
use FS::NetworkMonitoringSystem;
use FS::Tron qw( tron_lint );
use FS::Locales;
use FS::NetworkMonitoringSystem;
use FS::Tron qw( tron_lint );
use FS::Locales;
- use FS::Maketext qw( mt );
+ use FS::Maketext qw( mt
emt js_mt
);
use FS::agent;
use FS::agent_type;
use FS::agent;
use FS::agent_type;
@@
-278,13
+280,30
@@
if ( -e $addl_handler_use_file ) {
use FS::torrus_srvderive_component;
use FS::areacode;
use FS::svc_dish;
use FS::torrus_srvderive_component;
use FS::areacode;
use FS::svc_dish;
+ use FS::h_svc_dish;
use FS::svc_hardware;
use FS::svc_hardware;
+ use FS::h_svc_hardware;
use FS::hardware_class;
use FS::hardware_type;
use FS::hardware_status;
use FS::did_order_item;
use FS::msa;
use FS::rate_center;
use FS::hardware_class;
use FS::hardware_type;
use FS::hardware_status;
use FS::did_order_item;
use FS::msa;
use FS::rate_center;
+ use FS::cust_msg;
+ use FS::radius_group;
+ use FS::template_content;
+ use FS::dsl_device;
+ use FS::nas;
+ use FS::nas;
+ use FS::export_nas;
+ use FS::legacy_cust_bill;
+ use FS::rate_tier;
+ use FS::rate_tier_detail;
+ use FS::radius_attr;
+ use FS::discount_plan;
+ use FS::tower;
+ use FS::tower_sector;
+ use FS::contact_class;
# Sammath Naur
if ( $FS::Mason::addl_handler_use ) {
# Sammath Naur
if ( $FS::Mason::addl_handler_use ) {
@@
-522,11
+541,14
@@
sub mason_interps {
my $html_defang = new HTML::Defang (%defang_opts);
my $html_defang = new HTML::Defang (%defang_opts);
+ #false laziness w/ FS::Maketext js_mt
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;
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;
+ # prevent premature termination of the script
+ ${$_[0]} =~ s[</script>][<\\/script>]ig;
${$_[0]} = "'". ${$_[0]}. "'";
};
${$_[0]} = "'". ${$_[0]}. "'";
};
@@
-552,11
+574,13
@@
sub mason_interps {
[ 'freeside' => '%%%FREESIDE_DOCUMENT_ROOT%%%' ],
],
escape_flags => { 'h' => \&RT::Interface::Web::EscapeUTF8,
[ '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',
'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
)],
),
);
),
);