Skip to content

Fix a bug when sanitizing scoped attribute of style element#25

Merged
encukou merged 3 commits intopyvec:masterfrom
frenzymadness:fix_sanitizer
Oct 20, 2019
Merged

Fix a bug when sanitizing scoped attribute of style element#25
encukou merged 3 commits intopyvec:masterfrom
frenzymadness:fix_sanitizer

Conversation

@frenzymadness
Copy link
Copy Markdown
Member

When sanitizing scoped attribute of <style> element it makes sense to do it before DisallowedAttribute exception is raised (because scoped is not in sets of allowed attributes) and it also makes sense to continue when this attribute is deleted from an element.

I've found this bug because notebook files contains style elements with scoped attibutes.

@frenzymadness
Copy link
Copy Markdown
Member Author

Ping

@encukou
Copy link
Copy Markdown
Member

encukou commented Oct 18, 2019

Ow, sorry! I missed the notification :(

Do you have a notebook that we could use as a test?

@frenzymadness
Copy link
Copy Markdown
Member Author

For example this notebook contains a lot of <style scoped> tags.

@encukou encukou merged commit 55fc5a9 into pyvec:master Oct 20, 2019
encukou added a commit to encukou/naucse.python.cz that referenced this pull request Oct 20, 2019
The main update is to naucse 1.1.1, to fix:
pyvec/naucse#25
encukou added a commit to encukou/naucse.python.cz that referenced this pull request Oct 20, 2019
The main update is to naucse 0.1.1, to fix:
pyvec/naucse#25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants