aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-02-08 21:26:28 -0800
committerFriendika <info@friendika.com>2011-02-08 21:26:28 -0800
commit5899ae9017c351b9987868871605f3f2324c62c0 (patch)
tree376d540bb319d74d734cdadcd096b0fbb8ad5767 /include
parent6b8bbef6c795fcf73c7c7271decf0f0bfed158c7 (diff)
downloadvolse-hubzilla-5899ae9017c351b9987868871605f3f2324c62c0.tar.gz
volse-hubzilla-5899ae9017c351b9987868871605f3f2324c62c0.tar.bz2
volse-hubzilla-5899ae9017c351b9987868871605f3f2324c62c0.zip
Support bbcode size tag - I may regret this...
Diffstat (limited to 'include')
-rw-r--r--include/bbcode.php4
-rw-r--r--include/html2bbcode.php2
2 files changed, 4 insertions, 2 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index eb0806dc5..f39ebd5b9 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -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);
diff --git a/include/html2bbcode.php b/include/html2bbcode.php
index 6af8df824..bde761f2f 100644
--- a/include/html2bbcode.php
+++ b/include/html2bbcode.php
@@ -26,6 +26,7 @@ function html2bbcode($s) {
'/\<a (.*?)href=\"(.*?)\"(.*?)\>(.*?)\<\/a\>/is',
'/\<code\>(.*?)\<\/code\>/is',
'/\<span style=\"color:(.*?)\"\>(.*?)\<\/span\>/is',
+ '/\<span style=\"font-size:(.*?)\"\>(.*?)\<\/span\>/is',
'/\<blockquote\>(.*?)\<\/blockquote\>/is',
'/\<video(.*?) src=\"(.*?)\" (.*?)\>(.*?)\<\/video\>/is',
'/\<audio(.*?) src=\"(.*?)\" (.*?)\>(.*?)\<\/audio\>/is',
@@ -51,6 +52,7 @@ function html2bbcode($s) {
'[url=$2]$4[/url]',
'[code]$1[/code]',
'[color="$1"]$2[/color]',
+ '[size=$1]$2[/size]',
'[quote]$1[/quote]',
'[video]$1[/video]',
'[audio]$1[/audio]',