From ff0989a7022e717e8b200f62ad5c9cdc3b6cc440 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 16 Sep 2012 13:54:04 +0000 Subject: [PATCH] Accept float in inline styles. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10396 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redcloth3.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redcloth3.rb b/lib/redcloth3.rb index c91c61718..ee934b6ab 100644 --- a/lib/redcloth3.rb +++ b/lib/redcloth3.rb @@ -505,7 +505,7 @@ class RedCloth3 < String atts end - STYLES_RE = /^(color|width|height|border|background|padding|margin|font|text)(-[a-z]+)*:\s*((\d+%?|\d+px|\d+(\.\d+)?em|#[0-9a-f]+|[a-z]+)\s*)+$/i + STYLES_RE = /^(color|width|height|border|background|padding|margin|font|text|float)(-[a-z]+)*:\s*((\d+%?|\d+px|\d+(\.\d+)?em|#[0-9a-f]+|[a-z]+)\s*)+$/i def sanitize_styles(str) styles = str.split(";").map(&:strip)