{"action":"created","issue":{"url":"https://api.github.com/repos/svg/svgo/issues/527","repository_url":"https://api.github.com/repos/svg/svgo","labels_url":"https://api.github.com/repos/svg/svgo/issues/527/labels{/name}","comments_url":"https://api.github.com/repos/svg/svgo/issues/527/comments","events_url":"https://api.github.com/repos/svg/svgo/issues/527/events","html_url":"https://github.com/svg/svgo/issues/527","id":144402541,"number":527,"title":"<script> inside SVG","user":{"login":"ethanmay","id":7116314,"avatar_url":"https://avatars.githubusercontent.com/u/7116314?v=3","gravatar_id":"","url":"https://api.github.com/users/ethanmay","html_url":"https://github.com/ethanmay","followers_url":"https://api.github.com/users/ethanmay/followers","following_url":"https://api.github.com/users/ethanmay/following{/other_user}","gists_url":"https://api.github.com/users/ethanmay/gists{/gist_id}","starred_url":"https://api.github.com/users/ethanmay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethanmay/subscriptions","organizations_url":"https://api.github.com/users/ethanmay/orgs","repos_url":"https://api.github.com/users/ethanmay/repos","events_url":"https://api.github.com/users/ethanmay/events{/privacy}","received_events_url":"https://api.github.com/users/ethanmay/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-29T22:02:57Z","updated_at":"2016-05-10T22:45:39Z","closed_at":null,"body":"Hi there,\r\n\r\nI am using Iconic svg icons, which have \"smart\" svgs that contain `<script>` tags inside them. I need help figuring out which setting to disable. I have pasted the code below.\r\n\r\n```html\r\n<script class=\"iconic-api\" type=\"application/ecmascript\">\r\n//<![CDATA[\r\nvar iconicApis=window._Iconic?window._Iconic.smartIconApis:{};iconicApis[\"account\"]=iconicApis[\"account\"]||function(t){var i=function(i){t.setAttribute(\"data-state\",i);var e,n=t.querySelectorAll(\".iconic-account-login\"),o=t.querySelectorAll(\".iconic-account-logout\");if(\"logout\"===i){for(e=0;e<n.length;e++)n[e].setAttribute(\"display\",\"none\");for(e=0;e<o.length;e++)o[e].setAttribute(\"display\",\"inline\")}else{for(e=0;e<n.length;e++)n[e].setAttribute(\"display\",\"inline\");for(e=0;e<o.length;e++)o[e].setAttribute(\"display\",\"none\")}},e=function(){var e=t.getAttribute(\"data-state\");e&&i(e)};return{update:e,setState:i}};\r\n//]]>\r\n</script>\r\n```\r\n\r\nThe offending code seems to come in here: `e&&i(e)`. When the .svgs are minified, that code is converted to `e&amp;&amp;i(e)`.\r\n\r\nThank you very much for any help you can provide!"},"comment":{"url":"https://api.github.com/repos/svg/svgo/issues/comments/218314245","html_url":"https://github.com/svg/svgo/issues/527#issuecomment-218314245","issue_url":"https://api.github.com/repos/svg/svgo/issues/527","id":218314245,"user":{"login":"hellol11","id":12053714,"avatar_url":"https://avatars.githubusercontent.com/u/12053714?v=3","gravatar_id":"","url":"https://api.github.com/users/hellol11","html_url":"https://github.com/hellol11","followers_url":"https://api.github.com/users/hellol11/followers","following_url":"https://api.github.com/users/hellol11/following{/other_user}","gists_url":"https://api.github.com/users/hellol11/gists{/gist_id}","starred_url":"https://api.github.com/users/hellol11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hellol11/subscriptions","organizations_url":"https://api.github.com/users/hellol11/orgs","repos_url":"https://api.github.com/users/hellol11/repos","events_url":"https://api.github.com/users/hellol11/events{/privacy}","received_events_url":"https://api.github.com/users/hellol11/received_events","type":"User","site_admin":false},"created_at":"2016-05-10T22:45:39Z","updated_at":"2016-05-10T22:45:39Z","body":"The comments are not useless. When you use the `<script>` tag, 2 different parsers are working at the same time: the XML parser, and the JavaScript parser. Because the JavaScript parser is active, we need to hide the cdata sections from the JavaScript parser."}}