{"action":"created","issue":{"url":"https://api.github.com/repos/htacg/tidy-html5/issues/659","repository_url":"https://api.github.com/repos/htacg/tidy-html5","labels_url":"https://api.github.com/repos/htacg/tidy-html5/issues/659/labels{/name}","comments_url":"https://api.github.com/repos/htacg/tidy-html5/issues/659/comments","events_url":"https://api.github.com/repos/htacg/tidy-html5/issues/659/events","html_url":"https://github.com/htacg/tidy-html5/issues/659","id":282626197,"number":659,"title":"escape-cdata doesn't seem to work","user":{"login":"dechamps","id":866859,"avatar_url":"https://avatars3.githubusercontent.com/u/866859?v=4","gravatar_id":"","url":"https://api.github.com/users/dechamps","html_url":"https://github.com/dechamps","followers_url":"https://api.github.com/users/dechamps/followers","following_url":"https://api.github.com/users/dechamps/following{/other_user}","gists_url":"https://api.github.com/users/dechamps/gists{/gist_id}","starred_url":"https://api.github.com/users/dechamps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dechamps/subscriptions","organizations_url":"https://api.github.com/users/dechamps/orgs","repos_url":"https://api.github.com/users/dechamps/repos","events_url":"https://api.github.com/users/dechamps/events{/privacy}","received_events_url":"https://api.github.com/users/dechamps/received_events","type":"User","site_admin":false},"labels":[{"id":176427299,"url":"https://api.github.com/repos/htacg/tidy-html5/labels/Technical%20Support","name":"Technical Support","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/htacg/tidy-html5/milestones/10","html_url":"https://github.com/htacg/tidy-html5/milestone/10","labels_url":"https://api.github.com/repos/htacg/tidy-html5/milestones/10/labels","id":2781206,"number":10,"title":"5.7","description":"After the 5.6 release...","creator":{"login":"geoffmcl","id":1333435,"avatar_url":"https://avatars3.githubusercontent.com/u/1333435?v=4","gravatar_id":"","url":"https://api.github.com/users/geoffmcl","html_url":"https://github.com/geoffmcl","followers_url":"https://api.github.com/users/geoffmcl/followers","following_url":"https://api.github.com/users/geoffmcl/following{/other_user}","gists_url":"https://api.github.com/users/geoffmcl/gists{/gist_id}","starred_url":"https://api.github.com/users/geoffmcl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoffmcl/subscriptions","organizations_url":"https://api.github.com/users/geoffmcl/orgs","repos_url":"https://api.github.com/users/geoffmcl/repos","events_url":"https://api.github.com/users/geoffmcl/events{/privacy}","received_events_url":"https://api.github.com/users/geoffmcl/received_events","type":"User","site_admin":false},"open_issues":25,"closed_issues":1,"state":"open","created_at":"2017-09-20T18:32:39Z","updated_at":"2017-12-26T18:20:13Z","due_on":"2018-05-24T07:00:00Z","closed_at":null},"comments":1,"created_at":"2017-12-16T14:15:19Z","updated_at":"2017-12-26T18:57:55Z","closed_at":null,"author_association":"NONE","body":"Documentation states:\r\n\r\n> `--escape-cdata` Boolean (`no` if unset)\r\n> This option specifies if Tidy should convert <![CDATA[]]> sections to normal text.\r\n\r\nOn current HEAD (f0438bd):\r\n\r\n```\r\n$ tidy --escape-cdata yes <<EOF\r\n<?xml version=\"1.0\" ?>\r\n<!DOCTYPE html>\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title></title><meta charset=\"utf-8\" /></head>\r\n<body>\r\n<script><![CDATA[\r\n\tfoo\r\n]]></script>\r\n</body></html>\r\nEOF\r\n```\r\n\r\nReturns:\r\n\r\n```\r\nInfo: Document content looks like XHTML5\r\nNo warnings or errors were found.\r\n\r\n<?xml version=\"1.0\"?>\r\n<!DOCTYPE html>\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<meta name=\"generator\" content=\r\n\"HTML Tidy for HTML5 for Linux version 5.7.0\" />\r\n<title></title>\r\n<meta charset=\"utf-8\" />\r\n</head>\r\n<body>\r\n<script>\r\n<![CDATA[\r\n        foo\r\n]]>\r\n</script>\r\n</body>\r\n</html>\r\n```\r\n\r\nThe CDATA section is still there."},"comment":{"url":"https://api.github.com/repos/htacg/tidy-html5/issues/comments/354001140","html_url":"https://github.com/htacg/tidy-html5/issues/659#issuecomment-354001140","issue_url":"https://api.github.com/repos/htacg/tidy-html5/issues/659","id":354001140,"user":{"login":"dechamps","id":866859,"avatar_url":"https://avatars3.githubusercontent.com/u/866859?v=4","gravatar_id":"","url":"https://api.github.com/users/dechamps","html_url":"https://github.com/dechamps","followers_url":"https://api.github.com/users/dechamps/followers","following_url":"https://api.github.com/users/dechamps/following{/other_user}","gists_url":"https://api.github.com/users/dechamps/gists{/gist_id}","starred_url":"https://api.github.com/users/dechamps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dechamps/subscriptions","organizations_url":"https://api.github.com/users/dechamps/orgs","repos_url":"https://api.github.com/users/dechamps/repos","events_url":"https://api.github.com/users/dechamps/events{/privacy}","received_events_url":"https://api.github.com/users/dechamps/received_events","type":"User","site_admin":false},"created_at":"2017-12-26T18:57:55Z","updated_at":"2017-12-26T18:57:55Z","author_association":"NONE","body":"I think we're on the same page. \r\n\r\n> Script, and style tags, and maybe some others, already tell tidy to not mess too much with the text content of these blocks... and the option --escape-cdata just does not apply to these blocks...\r\n\r\nAh, interesting. I only tested CDATA sections in `<script>` tags. I wasn't aware that `--escape-cdata` does work on some tags, just not that one. So I guess a more accurate bug summary is \"escape-cdata doesn't seem to work on `<script>` tags\", which is unfortunate, since that's precisely on that sort of tag that CDATA tends to get used and where that  `--escape-cdata` option would be most useful!\r\n\r\nIt's a bit unfortunate that tidy tries to not mess with the content of `<script>` tags in some aspects (like these `--escape-cdata` sections) but then actively messes with them in other aspects (see #660). It's weirdly inconsistent, and in the present case it means that `--escape-cdata` cannot be used to \"fix\" the problems introduced by #660."}}
{"actor":{"display_login":"dechamps"}}