Index: lib/redmine/wiki_formatting/textile/redcloth3.rb =================================================================== --- lib/redmine/wiki_formatting/textile/redcloth3.rb (revision 17169) +++ lib/redmine/wiki_formatting/textile/redcloth3.rb (working copy) @@ -514,7 +514,7 @@ atts end - 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 + STYLES_RE = /^(color|(min-|max-)?+(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) Index: test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb =================================================================== --- test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb (revision 17169) +++ test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb (working copy) @@ -80,6 +80,8 @@ 'p{border-right:1px}. text' => '

text

', 'p{border-top:1px}. text' => '

text

', 'p{border-bottom:1px}. text' => '

text

', + 'p{max-width: 100px}. text' => '

text

', + 'p{width: 50px}. text' => '

text

', }, false) # multiple styles