Skip to content
Snippets Groups Projects
Commit 4dc4dc14 authored by Jared Hancock's avatar Jared Hancock
Browse files

Don't make <a> tag content clickable

parent 0f66f6d6
No related branches found
No related tags found
No related merge requests found
......@@ -241,7 +241,7 @@ class Format {
$token = $ost->getLinkToken();
//Not perfect but it works - please help improve it.
$text=preg_replace_callback('/(?<!")(((f|ht){1}tp(s?):\/\/)[-a-zA-Z0-9@:%_\+.~#?&;\/\/=]+)/',
$text=preg_replace_callback('/(?<!"|>)(((f|ht)tp(s?):\/\/)[-a-zA-Z0-9@:%_\+.~#?&;\/\/=]+)/',
create_function('$matches', # nolint
sprintf('return "<a href=\"l.php?url=".urlencode($matches[1])."&auth=%s\" target=\"_blank\">".$matches[1]."</a>";', # nolint
$token)),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment