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

wants to merge 1 commit into


None yet
1 participant

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

Both planet/vendor/ and planet/vendor/html5lib/ (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.

Modified feed parser and html5lib to allow data- HTML5 attributes thr…
…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