Commit: b299c0446bc6604b2adbafa397110af76dc141f6 Author: Adam Harvey <ahar...@php.net> Thu, 29 May 2014 11:01:27 -0700 Parents: edf24d3aa53bc8e0441faf80e2ddab38770d7681 Branches: master
Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=b299c0446bc6604b2adbafa397110af76dc141f6 Log: Don't include trailing commas in automatically generated links. Changed paths: M include/functions.php Diff: diff --git a/include/functions.php b/include/functions.php index 2a62f57..0782e23 100644 --- a/include/functions.php +++ b/include/functions.php @@ -1239,7 +1239,7 @@ the rest of the comments, please view the bug report online at function addlinks($text) { $text = htmlspecialchars($text); - $text = preg_replace("/((mailto|http|https|ftp|nntp|news):.+?)(>|\\s|\\)|\\.\\s|$)/i","<a href=\"\\1\" rel=\"nofollow\">\\1</a>\\3",$text); + $text = preg_replace("/((mailto|http|https|ftp|nntp|news):.+?)(>|\\s|\\)|\\.\\s|,\\s|$)/i","<a href=\"\\1\" rel=\"nofollow\">\\1</a>\\3",$text); # what the heck is this for? $text = preg_replace("/[.,]?-=-\"/", '"', $text); -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php