linkify naked urls when they are at the beginning of the text
This commit is contained in:
parent
f278d17910
commit
6c0218563f
|
@ -21,7 +21,8 @@ function bbcode($Text) {
|
|||
|
||||
// Perform URL Search
|
||||
|
||||
$Text = preg_replace("/[^\]\=](https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]*)/", ' <a href="$1" >$1</a>', $Text);
|
||||
|
||||
$Text = preg_replace("/([^\]\=]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]*)/", ' <a href="$2" >$2</a>', $Text);
|
||||
|
||||
$Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/", '<a href="$1" >$1</a>', $Text);
|
||||
$Text = preg_replace("(\[url\=([$URLSearchString]*)\](.+?)\[/url\])", '<a href="$1" >$2</a>', $Text);
|
||||
|
|
Loading…
Reference in New Issue
Block a user