linkify bugfix
This commit is contained in:
parent
0a96927e50
commit
051747f114
@ -258,8 +258,8 @@ function onlySimpleHTML($s) {
|
||||
return $s;
|
||||
}
|
||||
function linkify($input) {
|
||||
$pattern = '@(http(s)?://)?(([a-zA-Z])([-\w]+\.)+([^\s\.]+[^\s]*)+[^,.\s])@';
|
||||
return $output = preg_replace ( $pattern, '<a href="http$2://$3">$0</a>', $input );
|
||||
$pattern = '@(http(s)?://[a-zA-Z0-9/\.\#\-\_]*)@';
|
||||
return $output = preg_replace ( $pattern, '<a href="$1">$1</a>', $input );
|
||||
}
|
||||
function inStr($needle, $haystack) {
|
||||
if (strpos ( $haystack, $needle ) !== false) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user