diff --git a/bbcode-filter.inc b/bbcode-filter.inc index 5c5fe469b3ed44a379594fd4993c9d1d2da72cc2..52ed76943ebacda5571be4c9c7aabb050843535d 100644 --- a/bbcode-filter.inc +++ b/bbcode-filter.inc @@ -87,7 +87,7 @@ function _bbcode_filter_process(&$body, $settings) { $arr = array( 'tag' => 'size', 'pattern' => '#\[\x07=([\d]+)(?::\w+)?\]([^\x07]*)\[/\x07(?::\w+)?\]#esi', - 'replacement' => '"". str_replace(\'\"\', \'"\', \'$2\') .""', + 'replacement' => '"". str_replace(\'\"\', \'"\', \'$2\') .""', 'text' => $body, ); $body = _bbcode_replace_nest_tag($arr); @@ -385,16 +385,13 @@ function _bbcode_php_tag($text = NULL) { return '
' . highlight_string( str_replace('
', '', stripslashes($text)), TRUE) . '
'; } -function _bbcode_round_size_val($size) { - if ($size < 6) { - return 6; - } - elseif ($size > 48) { - return 48; - } - else { - return $size; - } +function _bbcode_size_val($size) { + if ($size < 6) + return '6px'; + elseif ($size <= 48) + return $size . 'px'; + else + return $size . '%'; } function _bbcode_replace_nest_tag($arr = NULL) {