Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3e500bb

Browse files
ambvVladimir Kuvandjievkuvandjiev
authored
Allow min-height, max-height, min-width, max-width in the sanitizer (#566)
Co-authored-by: Vladimir Kuvandjiev <vladimir.kuvandjiev@endava.com>Co-authored-by: Vladimir Kuvandjiev <kuvandjiev@gmail.com>
1 parentf0bb2a6 commit3e500bb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

‎html5lib/filters/sanitizer.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,10 @@
598598
'height',
599599
'letter-spacing',
600600
'line-height',
601+
'max-height',
602+
'min-height',
603+
'max-width',
604+
'min-width',
601605
'overflow',
602606
'pause',
603607
'pause-after',

‎html5lib/tests/sanitizer-testdata/tests1.dat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@
133133

134134
{
135135
"name": "platypus",
136-
"input": "<a href=\"http://www.ragingplatypus.com/\" style=\"display:block; position:absolute; left:0; top:0; width:100%; height:100%; z-index:1; background-color:black; background-image:url(http://www.ragingplatypus.com/i/cam-full.jpg); background-x:center; background-y:center; background-repeat:repeat;\">never trust your upstream platypus</a>",
137-
"output": "<a href='http://www.ragingplatypus.com/' style='display: block; width: 100%; height: 100%; background-color: black; background-x: center; background-y: center;'>never trust your upstream platypus</a>"
136+
"input": "<a href=\"http://www.ragingplatypus.com/\" style=\"display:block; position:absolute; left:0; top:0; width:100%; height:100%;min-height: 12px; max-height:1800px; min-width:12pt; max-width:3000rem;z-index:1; background-color:black; background-image:url(http://www.ragingplatypus.com/i/cam-full.jpg); background-x:center; background-y:center; background-repeat:repeat;\">never trust your upstream platypus</a>",
137+
"output": "<a href='http://www.ragingplatypus.com/' style='display: block; width: 100%; height: 100%;min-height: 12px; max-height: 1800px; min-width: 12pt; max-width: 3000rem;background-color: black; background-x: center; background-y: center;'>never trust your upstream platypus</a>"
138138
},
139139

140140
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp