modify linkify to work correctly with Red mid's containing '@'

This commit is contained in:
friendica
2013-04-08 16:58:52 -07:00
parent 989e78137e
commit f5940b7ddb
3 changed files with 98 additions and 90 deletions

View File

@@ -716,7 +716,7 @@ function valid_email($x){
function linkify($s) {
$s = preg_replace("/(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\'\%\$\!\+]*)/", ' <a href="$1" >$1</a>', $s);
$s = preg_replace("/(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\@\~\#\'\%\$\!\+]*)/", ' <a href="$1" >$1</a>', $s);
$s = preg_replace("/\<(.*?)(src|href)=(.*?)\&amp\;(.*?)\>/ism",'<$1$2=$3&$4>',$s);
return($s);
}