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