Skip to content
Snippets Groups Projects
Commit a8740f95 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #78 from protich/feature/clickable_urls

Feature/clickable urls
parents 7708707b e49b23d3
Branches
Tags
No related merge requests found
...@@ -126,7 +126,7 @@ class Format { ...@@ -126,7 +126,7 @@ class Format {
$text=preg_replace("/(^|[ \\n\\r\\t])(www\.([a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+)(\/[^\/ \\n\\r]*)*)/", $text=preg_replace("/(^|[ \\n\\r\\t])(www\.([a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+)(\/[^\/ \\n\\r]*)*)/",
'\\1<a href="l.php?url=http://\\2" target="_blank">\\2</a>', $text); '\\1<a href="l.php?url=http://\\2" target="_blank">\\2</a>', $text);
$text=preg_replace("/(^|[ \\n\\r\\t])([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,4})/", $text=preg_replace("/(^|[ \\n\\r\\t])([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,4})/",
'\\1<a href="l.php?url=mailto:\\2" target="_blank">\\2</a>', $text); '\\1<a href="mailto:\\2" target="_blank">\\2</a>', $text);
return $text; return $text;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment