diff options
author | levinse <levinse> | 2011-02-21 06:03:09 +0000 |
---|---|---|
committer | levinse <levinse> | 2011-02-21 06:03:09 +0000 |
commit | 5c0d47bfe554a35c8906d97b9fabd9999be4f67e (patch) | |
tree | 63320febddcf462711a94d70e700729cfc13ed22 /httemplate | |
parent | 9e6bf0f56f0bd9ceef7cbc22975583968e9f4fb2 (diff) |
trim whitespace for domain field in svc_domain prov UI, RT11432
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/edit/process/svc_domain.cgi | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/httemplate/edit/process/svc_domain.cgi b/httemplate/edit/process/svc_domain.cgi index 381339bc8..a5c617d83 100755 --- a/httemplate/edit/process/svc_domain.cgi +++ b/httemplate/edit/process/svc_domain.cgi @@ -46,6 +46,11 @@ my $new = new FS::svc_domain ( { } ( fields('svc_domain'), qw( pkgnum svcpart action ) ) } ); +# trim leading and trailing whitespace to avoid errors caused by pasting into UI +my $domain = $new->domain; +$domain =~ s/^\s+|\s+$//g; +$new->domain($domain); + my $error = ''; if ($cgi->param('svcnum')) { $error = $new->replace(); |