{"action":"created","issue":{"url":"https://api.github.com/repos/iVis-at-Bilkent/cytoscape.js-graphml/issues/6","repository_url":"https://api.github.com/repos/iVis-at-Bilkent/cytoscape.js-graphml","labels_url":"https://api.github.com/repos/iVis-at-Bilkent/cytoscape.js-graphml/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/iVis-at-Bilkent/cytoscape.js-graphml/issues/6/comments","events_url":"https://api.github.com/repos/iVis-at-Bilkent/cytoscape.js-graphml/issues/6/events","html_url":"https://github.com/iVis-at-Bilkent/cytoscape.js-graphml/issues/6","id":189812231,"number":6,"title":"Special characters are not encoded","user":{"login":"sveinp","id":1020523,"avatar_url":"https://avatars.githubusercontent.com/u/1020523?v=3","gravatar_id":"","url":"https://api.github.com/users/sveinp","html_url":"https://github.com/sveinp","followers_url":"https://api.github.com/users/sveinp/followers","following_url":"https://api.github.com/users/sveinp/following{/other_user}","gists_url":"https://api.github.com/users/sveinp/gists{/gist_id}","starred_url":"https://api.github.com/users/sveinp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sveinp/subscriptions","organizations_url":"https://api.github.com/users/sveinp/orgs","repos_url":"https://api.github.com/users/sveinp/repos","events_url":"https://api.github.com/users/sveinp/events{/privacy}","received_events_url":"https://api.github.com/users/sveinp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-16T19:12:27Z","updated_at":"2016-11-16T19:15:02Z","closed_at":null,"body":"When generating XML, special XML characters in XML (&,<,>,\") are not encoded properly, leading to invalid XML.\r\n\r\nEither pack all values into <![CDATA[]]> or check/replace the special characters - something like:\r\n\r\nfunction escapeXml(unsafe) {\r\n    return unsafe.replace(/[<>&'\"]/g, function (c) {\r\n        switch (c) {\r\n            case '<': return '&lt;';\r\n            case '>': return '&gt;';\r\n            case '&': return '&amp;';\r\n            case '\\'': return '&apos;';\r\n            case '\"': return '&quot;';\r\n        }\r\n    });\r\n}"},"comment":{"url":"https://api.github.com/repos/iVis-at-Bilkent/cytoscape.js-graphml/issues/comments/261042733","html_url":"https://github.com/iVis-at-Bilkent/cytoscape.js-graphml/issues/6#issuecomment-261042733","issue_url":"https://api.github.com/repos/iVis-at-Bilkent/cytoscape.js-graphml/issues/6","id":261042733,"user":{"login":"sveinp","id":1020523,"avatar_url":"https://avatars.githubusercontent.com/u/1020523?v=3","gravatar_id":"","url":"https://api.github.com/users/sveinp","html_url":"https://github.com/sveinp","followers_url":"https://api.github.com/users/sveinp/followers","following_url":"https://api.github.com/users/sveinp/following{/other_user}","gists_url":"https://api.github.com/users/sveinp/gists{/gist_id}","starred_url":"https://api.github.com/users/sveinp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sveinp/subscriptions","organizations_url":"https://api.github.com/users/sveinp/orgs","repos_url":"https://api.github.com/users/sveinp/repos","events_url":"https://api.github.com/users/sveinp/events{/privacy}","received_events_url":"https://api.github.com/users/sveinp/received_events","type":"User","site_admin":false},"created_at":"2016-11-16T19:15:02Z","updated_at":"2016-11-16T19:15:02Z","body":"Hmm, my CDATA (after \"Either pack all values into\") became unvisible......\r\n"}}
{"actor":{"display_login":"sveinp"}}