diff options
author | Abinoam P. Marques Jr <abinoam@gmail.com> | 2012-02-12 14:59:07 -0800 |
---|---|---|
committer | Abinoam P. Marques Jr <abinoam@gmail.com> | 2012-02-12 14:59:07 -0800 |
commit | 74b529bda2fb024815299db094ac8313a9d9d809 (patch) | |
tree | 8f9d24999da753dc4b9bb786c43b3742a44fa841 /include/bbcode.php | |
parent | 92a585ed23fb458c97b5e24f5b8b86ea68866886 (diff) | |
download | volse-hubzilla-74b529bda2fb024815299db094ac8313a9d9d809.tar.gz volse-hubzilla-74b529bda2fb024815299db094ac8313a9d9d809.tar.bz2 volse-hubzilla-74b529bda2fb024815299db094ac8313a9d9d809.zip |
BBCode [size=50] --> font-size: 50px (with the unit px).
This [size=number] without unit is kind of a standard.
It was being rendered like "font-size: 50" and that's not valid CSS style.
Diffstat (limited to 'include/bbcode.php')
-rwxr-xr-x | include/bbcode.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index 3534a7315..fa5b7e080 100755 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -138,6 +138,8 @@ function bbcode($Text,$preserve_nl = false) { $Text = preg_replace("(\[color=(.*?)\](.*?)\[\/color\])ism","<span style=\"color: $1;\">$2</span>",$Text); // Check for sized text + // [size=50] --> font-size: 50px (with the unit). + $Text = preg_replace("(\[size=(\d*?)\](.*?)\[\/size\])ism","<span style=\"font-size: $1px;\">$2</span>",$Text); $Text = preg_replace("(\[size=(.*?)\](.*?)\[\/size\])ism","<span style=\"font-size: $1;\">$2</span>",$Text); // Check for list text |