Skip to content

Example of allowed element with attributes disallowed #21026

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

Open
wants to merge 1 commit into
base: 7.3
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions html_sanitizer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ attributes from the `W3C Standard Proposal`_ are allowed.
img: 'src'
# allow the <h1> element with all safe attributes
h1: '*'
# allow the <div> element with no attributes
div: []
Comment on lines +317 to +318
Copy link
Contributor

@alamirault alamirault May 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also update xml, php and php-standelone following code blocks to have this example ?

Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would love to help, but I have no idea how to test XML config files. I get nothing but DTD errors.


.. code-block:: xml

Expand Down
Loading