diff options
-rw-r--r-- | lib/redmine/wiki_formatting/common_mark/sanitization_filter.rb | 4 | ||||
-rw-r--r-- | test/unit/lib/redmine/wiki_formatting/common_mark/sanitization_filter_test.rb | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/redmine/wiki_formatting/common_mark/sanitization_filter.rb b/lib/redmine/wiki_formatting/common_mark/sanitization_filter.rb index adb301290..54e0db4cb 100644 --- a/lib/redmine/wiki_formatting/common_mark/sanitization_filter.rb +++ b/lib/redmine/wiki_formatting/common_mark/sanitization_filter.rb @@ -29,8 +29,8 @@ module Redmine ALLOWED_CSS_PROPERTIES = %w[ color background-color - width - height + width min-width max-width + height min-height max-height padding padding-left padding-right padding-top padding-bottom margin margin-left margin-right margin-top margin-bottom border border-left border-right border-top border-bottom border-radius border-style border-collapse border-spacing diff --git a/test/unit/lib/redmine/wiki_formatting/common_mark/sanitization_filter_test.rb b/test/unit/lib/redmine/wiki_formatting/common_mark/sanitization_filter_test.rb index 8de671cc6..e3ac4bd33 100644 --- a/test/unit/lib/redmine/wiki_formatting/common_mark/sanitization_filter_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/common_mark/sanitization_filter_test.rb @@ -98,6 +98,10 @@ if Object.const_defined?(:CommonMarker) '<span style="color: #333; ">hello</span>"' ], [ + '<img src="photo.jpg" style="min-width: 100px; max-width: 200px; min-height: 100px; max-height: 200px;">', + '<img src="photo.jpg" style="min-width: 100px; max-width: 200px; min-height: 100px; max-height: 200px;">' + ], + [ '<b>Lo<!-- comment -->rem</b> <a href="pants" title="foo" style="text-decoration: underline;">ipsum</a> <a href="http://foo.com/"><strong>dolor</strong></a> sit<br/>amet <style>.foo { color: #fff; }</style> <script>alert("hello world");</script>', '<b>Lorem</b> <a href="pants" title="foo">ipsum</a> <a href="http://foo.com/"><strong>dolor</strong></a> sit<br>amet .foo { color: #fff; } ' ], |