1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-05 15:16:16 +02:00
git-svn-id: file:///svn/phpbb/trunk@2115 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2002-02-12 17:55:52 +00:00
parent 2b4c532027
commit 1efaa0f9cb

View File

@ -209,7 +209,7 @@ function bbencode_second_pass($text, $uid)
$replacements[4] = $bbcode_tpl['url4']; $replacements[4] = $bbcode_tpl['url4'];
// [email]user@domain.tld[/email] code.. // [email]user@domain.tld[/email] code..
$patterns[5] = "#\[email\]([a-z0-9\-_.]+?@[\w\-]+\.[\w\-\.]+\.[\w]+)\[/email\]#si"; $patterns[5] = "#\[email\]([a-z0-9\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si";
$replacements[5] = $bbcode_tpl['email']; $replacements[5] = $bbcode_tpl['email'];
$text = preg_replace($patterns, $replacements, $text); $text = preg_replace($patterns, $replacements, $text);
@ -612,7 +612,7 @@ function make_clickable($text)
// matches an email@domain type address at the start of a line, or after a space. // matches an email@domain type address at the start of a line, or after a space.
// Note: Only the followed chars are valid; alphanums, "-", "_" and or ".". // Note: Only the followed chars are valid; alphanums, "-", "_" and or ".".
$ret = preg_replace("#([\n ])([a-z0-9\-_.]+?)@([\w\-]+\.[\w\-\.]+\.[\w]+)#i", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>", $ret); $ret = preg_replace("#([\n ])([a-z0-9\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)?[\w]+)#i", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>", $ret);
// Remove our padding.. // Remove our padding..
$ret = substr($ret, 1); $ret = substr($ret, 1);