Browse code

trim whitespaces around domain names

Bernd Wurst authored on20/08/2019 16:25:00
Showing1 changed files
... ...
@@ -37,7 +37,7 @@ $form = '<p>Domainname: <input type="text" name="domain" size="50" /> <input typ
37 37
 output(html_form('adddomain_search', '', '', $form));
38 38
 
39 39
 if (isset($_REQUEST['domain'])) {
40
-    $request = idn_to_utf8($_REQUEST['domain'], 0, INTL_IDNA_VARIANT_UTS46);
40
+    $request = idn_to_utf8(trim($_REQUEST['domain']), 0, INTL_IDNA_VARIANT_UTS46);
41 41
     if (substr($request, 0, 4) == 'www.') {
42 42
         $request = str_replace('www.', '', $request);
43 43
     }