tinymce/tinymce — pull request #155 by jesperkristensen (2012-09-05 09:59:34+00:00)
Title: Data attributes are always allowed, even if they are not in valid_elements

I use the valid_elements configuration option to only allow limited formatting options. When I drag and drop some HTML into the editor and then save, the disallowed elements and attributes are removed, except for attributes where the name starts with "data-". These attributes are kept, even though they are not allowed, and this makes my server side input validation fail.

My changes fixes it, but I don't know exactly why, or if this breaks something else. Based on the commit where the code was introduced, https://github.com/tinymce/tinymce/commit/dc76f1514e47b951aec62c31ccd4b2aeb0e9fc56 , I think my changes should work.