diff --git a/bug_form.pl b/bug_form.pl
index 4ca7f43c5f9e673227aef876a70893be19f668fe..bac65d14c2e96e15af0bab4e4900734a4067abc3 100644
--- a/bug_form.pl
+++ b/bug_form.pl
@@ -71,7 +71,7 @@ sub quoteUrls {
 
     my @things;
     while ($text =~ s%((mailto:)?([\w\.\-\+\=]+\@[\w\-]+(?:\.[\w\-]+)+)\b|
-                       (\b((?:$protocol):\S+[\w/])))%"##$count##"%exo) {
+                    (\b((?:$protocol):[^ \t\n<>"]+[\w/])))%"##$count##"%exo) {
         my $item = $&;
 
         $item = value_quote($item);