{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"open","user":{"avatar_url":"https://secure.gravatar.com/avatar/f01cba0bab4f0545391d6ab91ef2f7e9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"f01cba0bab4f0545391d6ab91ef2f7e9","url":"https://api.github.com/users/deliminator","login":"deliminator","id":326606},"milestone":null,"assignee":null,"labels":[],"updated_at":"2011-11-10T14:55:15Z","closed_at":null,"comments":1,"url":"https://api.github.com/repos/alohaeditor/Aloha-Editor/issues/348","body":"The genericcontenthandler does too much. It rougly does the following:\r\n\r\n* removes table attributes: border, cellspacing, cellpadding\r\n* removes td attributes: width, height, valign\r\n* removes the paragraph in a td if it is the only one\r\n* replaces &lt;p>&lt;br>&lt;/p> with &amp;nbsp in a td\r\n* removes all colgroups (including contents)\r\n* transforms strong => b, em => i, s => del\r\n* removes u tags\r\n* removes comments\r\n* removes span, font, div tags\r\n* removes style tags and attributes\r\n* removes elements that are not in the HTML namespace (if set)\r\n\r\nThis is too much, since it is supposed to be generic. Only those clean-ups that are always a good idea should be done (I suppose removing comments is always a good idea).\r\n\r\nPasting from word (and probably other sources) do need the functionality above. So, the things the genriccontenthandler does are probably always a good idea when content is pasted. However, the genericcontenthandler can also be configured for cleaning up the content when the editable is initialized.\r\n\r\nIt may be possible to make the sanitize content handler handler do some of the things the genericcontenthandler does.\r\n\r\nWhat would be interesting to have is a generic content handler, that can be activated by default and used for initializing editables without causing any undesired side-effects.\r\n","html_url":"https://github.com/alohaeditor/Aloha-Editor/issues/348","title":"genericcontenthandler is brutal","number":348,"id":2198519,"created_at":"2011-11-10T14:49:40Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/cb411e00340071d953a9748eefcb9e13?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"cb411e00340071d953a9748eefcb9e13","url":"https://api.github.com/users/evo42","login":"evo42","id":90212},"updated_at":"2011-11-10T14:55:15Z","url":"https://api.github.com/repos/alohaeditor/Aloha-Editor/issues/comments/2696053","body":"+1 for moving some functions from generic to word and sanitize (and/or new ones) is a good idea","id":2696053,"created_at":"2011-11-10T14:55:15Z"}}