aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-02-09 16:55:31 -0800
committerFriendika <info@friendika.com>2011-02-09 16:55:31 -0800
commit971b16ea4aadf8a24427907619e482e4cafe6faa (patch)
treeb021846ea9e4f75d99261757bbf6a3ca41cebea6 /include/bbcode.php
parent1d12a2be699df4b5170901a63180beab52c464f7 (diff)
downloadvolse-hubzilla-971b16ea4aadf8a24427907619e482e4cafe6faa.tar.gz
volse-hubzilla-971b16ea4aadf8a24427907619e482e4cafe6faa.tar.bz2
volse-hubzilla-971b16ea4aadf8a24427907619e482e4cafe6faa.zip
Accept pretty much bloody anything inside a [url] tag as a legal URL.
Diffstat (limited to 'include/bbcode.php')
-rw-r--r--include/bbcode.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index f39ebd5b9..c55ebab00 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -15,14 +15,14 @@ function bbcode($Text) {
$Text = nl2br($Text);
// Set up the parameters for a URL search string
- $URLSearchString = " a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%";
+ $URLSearchString = "^\[\]";
// Set up the parameters for a MAIL search string
- $MAILSearchString = $URLSearchString . " a-zA-Z0-9\.@";
+ $MAILSearchString = $URLSearchString;
// Perform URL Search
- $Text = preg_replace("/([^\]\=]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]+)/", ' <a href="$2" target="external-link">$2</a>', $Text);
+ $Text = preg_replace("/([^\]\=]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%\$\!]+)/", ' <a href="$2" target="external-link">$2</a>', $Text);
$Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/", '<a href="$1" target="external-link">$1</a>', $Text);
$Text = preg_replace("(\[url\=([$URLSearchString]*)\](.+?)\[/url\])", '<a href="$1" target="external-link">$2</a>', $Text);