diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index adea2e86a..e20a73057 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -290,7 +290,7 @@ sub quoteUrls } # the protocol + non-whitespace + recursive braces + ending in [\w/~=)] - $text =~ s/\b((?:$safe_protocols):([^\s<>\"\(\)]+|\((?2)*\))+(?<=[\w\/~=)]))/ + $text =~ s/\b((?:$safe_protocols):((?>[^\s<>\"\(\)]+|\((?:(?2)|\")*\)))+(?<=[\w\/~=)]))/ ($tmp = html_quote($1)) && ($things[$count++] = "$tmp<\/a>") && ("\0\0" . ($count-1) . "\0\0")