Change default handler for url bb-code
This commit is contained in:
parent
4df4208aae
commit
a54975f2df
1 changed files with 5 additions and 1 deletions
|
@ -371,7 +371,11 @@ $fUrl = \str_replace([' ', '\'', '`', '"'], ['%20', '', '', ''], $url);
|
|||
if (0 === \strpos($url, 'ftp.')) {
|
||||
$fUrl = 'ftp://' . $fUrl;
|
||||
} elseif (! \preg_match('%^(?:\.?\.?/|#|[a-z](?:[a-z]|[a-z0-9]{1,6}):)%', $fUrl)) {
|
||||
$fUrl = '//' . $fUrl;
|
||||
if (\preg_match('%^[^/]+@[^/]+$%', $fUrl)) {
|
||||
$fUrl = 'mailto:' . $fUrl;
|
||||
} else {
|
||||
$fUrl = '//' . $fUrl;
|
||||
}
|
||||
}
|
||||
|
||||
if ($url === $body) {
|
||||
|
|
Loading…
Add table
Reference in a new issue