mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-31 19:47:14 +00:00
CommonMark Markdown formatter does not support min-width, max-width, min-height, and max-height CSS properties (#38073).
Patch by Go MAEDA. git-svn-id: https://svn.redmine.org/redmine/trunk@22025 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
1c937f1e23
commit
fcd4f7f6c9
@ -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
|
||||
|
||||
@ -97,6 +97,10 @@ if Object.const_defined?(:CommonMarker)
|
||||
'<span style="color: #333; background: url(\'https://example.com/evil.svg\')">hello</span>"',
|
||||
'<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; } '
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user