mirror of
https://github.com/friendica/friendica
synced 2025-04-23 07:50:12 +00:00
improved linkification of naked text urls
This commit is contained in:
parent
1adf69a049
commit
42d66874be
3 changed files with 9 additions and 4 deletions
|
@ -18,8 +18,7 @@ function bbcode($Text) {
|
|||
|
||||
// Perform URL Search
|
||||
|
||||
$Text = preg_replace("/[^\]\=](http\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]*)/", ' <a href="$1" >$1</a>', $Text);
|
||||
$Text = preg_replace("/[^\]\=](https\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]*)/", ' <a href="$1" >$1</a>', $Text);
|
||||
$Text = preg_replace("/[^\]\=](https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]*)/", ' <a href="$1" >$1</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…
Add table
Add a link
Reference in a new issue