aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2011-02-12 18:31:13 +0100
committerfabrixxm <fabrix.xm@gmail.com>2011-02-12 18:31:13 +0100
commit53dff2204bf2cbe46b6cbdb7174fa0cf1a7162b1 (patch)
treeeee6bc94d474e327a233c7053beb46d33036a65d /include/bbcode.php
parent26dfb73f48d4fcd4671d136e53f52bb81995ea34 (diff)
parent89cbd17c721dae57b18686fd7f3e5f8c74a279d9 (diff)
downloadvolse-hubzilla-53dff2204bf2cbe46b6cbdb7174fa0cf1a7162b1.tar.gz
volse-hubzilla-53dff2204bf2cbe46b6cbdb7174fa0cf1a7162b1.tar.bz2
volse-hubzilla-53dff2204bf2cbe46b6cbdb7174fa0cf1a7162b1.zip
Merge branch 'friendika-master'
Diffstat (limited to 'include/bbcode.php')
-rw-r--r--include/bbcode.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index eb0806dc5..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);
@@ -49,10 +49,10 @@ function bbcode($Text) {
$Text = preg_replace("(\[o\](.+?)\[\/o\])is",'<span class="overline">$1</span>',$Text);
// Check for colored text
- $Text = preg_replace("(\[color=(.+?)\](.+?)\[\/color\])is","<span style=\"color: $1\">$2</span>",$Text);
+ $Text = preg_replace("(\[color=(.+?)\](.+?)\[\/color\])is","<span style=\"color: $1;\">$2</span>",$Text);
// Check for sized text
- $Text = preg_replace("(\[size=(.+?)\](.+?)\[\/size\])is","<span style=\"font-size: $1px\">$2</span>",$Text);
+ $Text = preg_replace("(\[size=(.+?)\](.+?)\[\/size\])is","<span style=\"font-size: $1;\">$2</span>",$Text);
// Check for list text
$Text = preg_replace("/\[list\](.+?)\[\/list\]/is", '<ul class="listbullet">$1</ul>' ,$Text);