com web/bugs: Don't include trailing commas in automatically generated links.: include/functions.php

From: Date: Thu, 29 May 2014 18:01:27 +0000
Subject: com web/bugs: Don't include trailing commas in automatically generated links.: include/functions.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-19073@lists.php.net to get a copy of this message
Commit: b299c0446bc6604b2adbafa397110af76dc141f6 Author: Adam Harvey <aharvey@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):.+?)(&gt;|\\s|\\)|\\.\\s|$)/i","<a href=\"\\1\" rel=\"nofollow\">\\1</a>\\3",$text); + $text = preg_replace("/((mailto|http|https|ftp|nntp|news):.+?)(&gt;|\\s|\\)|\\.\\s|,\\s|$)/i","<a href=\"\\1\" rel=\"nofollow\">\\1</a>\\3",$text); # what the heck is this for? $text = preg_replace("/[.,]?-=-\"/", '"', $text);

« previous php.webmaster (#19073) next »