{"action":"created","issue":{"url":"https://api.github.com/repos/samclarke/SCEditor/issues/470","labels_url":"https://api.github.com/repos/samclarke/SCEditor/issues/470/labels{/name}","comments_url":"https://api.github.com/repos/samclarke/SCEditor/issues/470/comments","events_url":"https://api.github.com/repos/samclarke/SCEditor/issues/470/events","html_url":"https://github.com/samclarke/SCEditor/issues/470","id":100319014,"number":470,"title":"xhtml-plugin: deletion of empty cells in table","user":{"login":"derplakatankleber","id":10799271,"avatar_url":"https://avatars.githubusercontent.com/u/10799271?v=3","gravatar_id":"","url":"https://api.github.com/users/derplakatankleber","html_url":"https://github.com/derplakatankleber","followers_url":"https://api.github.com/users/derplakatankleber/followers","following_url":"https://api.github.com/users/derplakatankleber/following{/other_user}","gists_url":"https://api.github.com/users/derplakatankleber/gists{/gist_id}","starred_url":"https://api.github.com/users/derplakatankleber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derplakatankleber/subscriptions","organizations_url":"https://api.github.com/users/derplakatankleber/orgs","repos_url":"https://api.github.com/users/derplakatankleber/repos","events_url":"https://api.github.com/users/derplakatankleber/events{/privacy}","received_events_url":"https://api.github.com/users/derplakatankleber/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/samclarke/SCEditor/labels/attentionSam!","name":"attentionSam!","color":"e11d21"},{"url":"https://api.github.com/repos/samclarke/SCEditor/labels/Bug","name":"Bug","color":"F55847"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-11T14:04:19Z","updated_at":"2015-09-01T11:20:37Z","closed_at":null,"body":"The issue is that the xhtml plugin removes empty cells in tables, when I try to get the html content of the textarea.\r\n\r\nSetting: The normal SCEditor with xhtml plugin. I create a table with multiple rows and columns. I add some content in some cells. The last step is, to call the val-function from the sceditor to get the content of the textarea.\r\n\r\nsee testcase in github or fiddle: \r\nhttp://derplakatankleber.github.io/bugfix/testpage.htm\r\nhttp://jsfiddle.net/smjmLap5/4/\r\n=> click on \"Click to see textarea sourcecode\"\r\n\r\nEnv: IE 10 with Win7\r\n\r\nProblem: In the method \"signalToSource\" is a call to \"removeTags\", where the plugin removes blacklisted, not whitelisted or empty elements. The problem is, that this time the plugin should not remove the empty \"td\"-elements in my table, because the IE 10 creates a table with empty cells (without \"br\" elements, see IE_BR_FIX).\r\n\r\nPossible fixes that a see:\r\n1. Allow an exception to the \"remove empty elements\" rule for some elements like table cells.\r\n2. The problem does not exist in chrome or firefox or IE 11, because the editor creates a \"br\"-Tag in every cell, when the table is created (see IE_BR_FIX for create table). So the \"td\"-element is not empty and the plugin don't delete the cell. A workaround could be to write a non visible element in the cell. \r\nfor example: (IE_BR_FIX ? '<!-- fix me -->' : '<br />')\r\n\r\nBetter solution to the problem are welcome.\r\n\r\nPS: To deactivate the filter of the plugin is also a solution, but that would also deactivate some useful feature of the xhtml plugin."},"comment":{"url":"https://api.github.com/repos/samclarke/SCEditor/issues/comments/136678040","html_url":"https://github.com/samclarke/SCEditor/issues/470#issuecomment-136678040","issue_url":"https://api.github.com/repos/samclarke/SCEditor/issues/470","id":136678040,"user":{"login":"derplakatankleber","id":10799271,"avatar_url":"https://avatars.githubusercontent.com/u/10799271?v=3","gravatar_id":"","url":"https://api.github.com/users/derplakatankleber","html_url":"https://github.com/derplakatankleber","followers_url":"https://api.github.com/users/derplakatankleber/followers","following_url":"https://api.github.com/users/derplakatankleber/following{/other_user}","gists_url":"https://api.github.com/users/derplakatankleber/gists{/gist_id}","starred_url":"https://api.github.com/users/derplakatankleber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derplakatankleber/subscriptions","organizations_url":"https://api.github.com/users/derplakatankleber/orgs","repos_url":"https://api.github.com/users/derplakatankleber/repos","events_url":"https://api.github.com/users/derplakatankleber/events{/privacy}","received_events_url":"https://api.github.com/users/derplakatankleber/received_events","type":"User","site_admin":false},"created_at":"2015-09-01T11:20:36Z","updated_at":"2015-09-01T11:20:36Z","body":"The feature from ticket #475 would be sufficient to solve the issue.\r\nThe problem with that solution is to define a useful default value."}}