You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if "allowed_attributes" in settings.WAGTAILMARKDOWN:
bleach_kwargs["attributes"] = {
**bleach_kwargs["attributes"],
**settings.WAGTAILMARKDOWN["allowed_attributes"],
}
Newly added allowed_attributes should be added on top of default allowed_attributes. However, based on my testing here, default allowed_attributes are wiped out and the resulted <img> only has attributetitle=" " now.
#108 aims to address this, and provide 2 additional settings to control how the allowed_*, as well as the extension* settings behave (default: extend. but can be replaced)
by default,
allowed_attributes
for<img>
are["src", "alt"]
.When I configure my
settings.py
as below,Based on the source code wagtailmarkdown/utils.py
Newly added
allowed_attributes
should be added on top of defaultallowed_attributes
. However, based on my testing here, defaultallowed_attributes
are wiped out and the resulted<img>
only has attributetitle=" "
now.problem can be solved by including default
allowed_attributes
in thesettings.py
configurations.It is a minor issue, but since I experienced it, just share with the team.
The text was updated successfully, but these errors were encountered: