Ver Fonte

#1923 URLs detection bug for long TLD

Alex Trofimov há 7 anos atrás
pai
commit
9a24743cc6
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      inc/utils.inc.php

+ 1 - 1
inc/utils.inc.php

@@ -1590,7 +1590,7 @@ function bx_linkify($text, $sAttrs = '', $bHtmlSpecialChars = false)
     if ($bHtmlSpecialChars)
     if ($bHtmlSpecialChars)
         $text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8');
         $text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8');
 
 
-    $re = "@\b((https?://)|(www\.))(([0-9a-zA-Z_!~*'().&=+$%-]+:)?[0-9a-zA-Z_!~*'().&=+$%-]+\@)?(([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+\.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z]\.[a-zA-Z]{2,6})(:[0-9]{1,4})?((/[0-9a-zA-Z_!~*'().;?:\@&=+$,%#-]+)*/?)@";
+    $re = "@\b((https?://)|(www\.))(([0-9a-zA-Z_!~*'().&=+$%-]+:)?[0-9a-zA-Z_!~*'().&=+$%-]+\@)?(([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+\.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z]\.[a-zA-Z]{2,7})(:[0-9]{1,4})?((/[0-9a-zA-Z_!~*'().;?:\@&=+$,%#-]+)*/?)@";
     preg_match_all($re, $text, $matches, PREG_OFFSET_CAPTURE);
     preg_match_all($re, $text, $matches, PREG_OFFSET_CAPTURE);
 
 
     $matches = $matches[0];
     $matches = $matches[0];