Skip to content
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

Adjust sanitization code to allow HTML5 'data-' attributes through. #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nathan-osman
Copy link

Basically I have made two minor modifications to files in the planet/vendor folder.

Both planet/vendor/feedparser.py and planet/vendor/html5lib/sanitizer.py (which are used for sanitizing the HTML / XHTML encountered in a feed) strip out HTML5 data attributes. These attributes have no meaning to the browser (they are ignored) but third party scripts that are added to the planet page may make use of these attributes and having them stripped out breaks the scripts (or causes them to fail).

Therefore, I have modified the two above files to allow these attributes to pass through the filtering / sanitization unaltered.

Please let me know if you have any questions / concerns.

…ough because they have no meaning to a browser or SGML parser and may contain meta-data or other attributes that scripts added to the planet page may require.
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.

None yet

1 participant