summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevinse <levinse>2011-02-21 06:03:10 +0000
committerlevinse <levinse>2011-02-21 06:03:10 +0000
commit9c1ac2a6979365f4fe74021a10c014f6bfae095a (patch)
treef2c2a232960a90e7df98d0d5d270a8fbc8be1655
parent6178a15b24780f425a6bcad8a5e7679956558207 (diff)
trim whitespace for domain field in svc_domain prov UI, RT11432
-rwxr-xr-xhttemplate/edit/process/svc_domain.cgi5
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();