Allow style attribute on img tags to override CSS width
- Added style attribute to bleach allowlist for img tags
- Fixes issue where CSS img { width: 100%; } overrides width attribute
- Inline style='width:360px;' has higher specificity than stylesheet
- Now supports both width='360' and style='width:360px;' formats
This commit is contained in:
parent
cfe63b2f92
commit
0c8e1b4f89
1 changed files with 1 additions and 0 deletions
|
|
@ -56,6 +56,7 @@ def default_cleaner(tag_acl=None):
|
|||
attrs = markdown_attrs
|
||||
|
||||
attrs["img"].append("width")
|
||||
attrs["img"].append("style")
|
||||
attrs["span"] = ["class"]
|
||||
|
||||
# Allow both whitelist and blacklist tag_name/attr/attr_value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue