mirror of
https://github.com/friendica/friendica
synced 2025-04-19 06:30:10 +00:00
give orphans a second chance, linkify naked links
This commit is contained in:
parent
16ba93a5b1
commit
7db4a0dd2e
4 changed files with 55 additions and 33 deletions
|
@ -17,10 +17,15 @@ function bbcode($Text) {
|
|||
$MAILSearchString = $URLSearchString . " a-zA-Z0-9\.@";
|
||||
|
||||
// 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("/\[url\]([$URLSearchString]*)\[\/url\]/", '<a href="$1" >$1</a>', $Text);
|
||||
$Text = preg_replace("(\[url\=([$URLSearchString]*)\](.+?)\[/url\])", '<a href="$1" >$2</a>', $Text);
|
||||
//$Text = preg_replace("(\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[/url\])", '<a href="$1" target="_blank">$2</a>', $Text);
|
||||
|
||||
|
||||
// Perform MAIL Search
|
||||
$Text = preg_replace("(\[mail\]([$MAILSearchString]*)\[/mail\])", '<a href="mailto:$1">$1</a>', $Text);
|
||||
$Text = preg_replace("/\[mail\=([$MAILSearchString]*)\](.+?)\[\/mail\]/", '<a href="mailto:$1">$2</a>', $Text);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue