-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
schema: extend content accepted HTML tags & attrs #87
Conversation
9ca56fd
to
4c387a3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks very nice, thanks a lot! I added a comment to make it even more extensible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good, I have added a small last suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the extensive testing!
❤️ Thank you for your contribution!
Description
This PR introduces two new configurations in the Invenio pages module:
PAGES_ALLOWED_EXTRA_HTML_ATTRS
andPAGES_ALLOWED_EXTRA_HTML_TAGS
These allow instance-level customization of accepted HTML tags and attributes, enhancing content flexibility.
By default, it includes
<img />
and<button />
elements.The extended whitelist of attributes is as follows:
<img />
:["src", "alt", "title", "width", "height"]
<button />
:["type", "name", "value", "disabled", "onclick"]
Checklist
Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:
Third-party code
If you've added third-party code (copy/pasted or new dependencies), please reach out to an architect.
Reminder
By using GitHub, you have already agreed to the GitHub’s Terms of Service including that: