forked from leftypol/leftypol
?/config: Link URLs in comments
This commit is contained in:
parent
169c68e862
commit
e0a8ffcfb9
1 changed files with 7 additions and 1 deletions
|
@ -115,8 +115,14 @@ function config_vars() {
|
||||||
$already_exists = true;
|
$already_exists = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!$already_exists && permission_to_edit_config_var($var['name']))
|
if (!$already_exists && permission_to_edit_config_var($var['name'])) {
|
||||||
|
foreach ($var['comment'] as &$comment) {
|
||||||
|
$comment = preg_replace_callback(
|
||||||
|
'/((?:https?:\/\/|ftp:\/\/|irc:\/\/)[^\s<>()"]+?(?:\([^\s<>()"]*?\)[^\s<>()"]*?)*)((?:\s|<|>|"|\.||\]|!|\?|,|,|")*(?:[\s<>()"]|$))/',
|
||||||
|
'markup_url', $comment);
|
||||||
|
}
|
||||||
$conf[] = $var;
|
$conf[] = $var;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue