Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Bug 759212: allow more HTML attributes in content. #237

Merged
merged 1 commit into from Jun 1, 2012
Merged

Bug 759212: allow more HTML attributes in content. #237

merged 1 commit into from Jun 1, 2012

Conversation

nickolay
Copy link
Contributor

Allow attributes commonly used on tables in dekiwiki, such as the one on
https://developer.mozilla.org/en/DOM/DOM_event_reference

https://bugzilla.mozilla.org/show_bug.cgi?id=759212

Allow attributes commonly used on tables in dekiwiki, such as the one on
https://developer.mozilla.org/en/DOM/DOM_event_reference
@@ -57,12 +57,12 @@
ALLOWED_ATTRIBUTES['a'] = ['style', 'id', 'class', 'href', 'title', ]
ALLOWED_ATTRIBUTES.update(dict((x, ['style', 'name', ]) for x in
('h1', 'h2', 'h3', 'h4', 'h5', 'h6')))
ALLOWED_ATTRIBUTES.update(dict((x, ['id', ]) for x in (
ALLOWED_ATTRIBUTES.update(dict((x, ['id', 'style', 'class']) for x in (
Copy link
Contributor

Choose a reason for hiding this comment

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

allowing style scares me - too open for security exploits? e.g., http://html5sec.org/#9

how vital is it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@groovecoder it's already allowed for headings per the line just above the one I changed, so I'm not sure why it shouldn't be allowed everywhere. I don't know how vital is it, though, but I do know that deki allows it.

Copy link
Contributor

Choose a reason for hiding this comment

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

sounds like it's widely used. and bleach has a tight regex on the attribute values that should prevent javascript exploits.

groovecoder added a commit that referenced this pull request Jun 1, 2012
Bug 759212: allow more HTML attributes in content.
@groovecoder groovecoder merged commit 931f7e4 into mdn:master Jun 1, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants