mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-25 16:00:22 +01:00
?/config: Link URLs in comments
This commit is contained in:
parent
35e2c19fc0
commit
29d64f59a0
@ -115,8 +115,14 @@ function config_vars() {
|
||||
$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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user