{"action":"created","issue":{"url":"https://api.github.com/repos/oozcitak/xmlbuilder-js/issues/147","repository_url":"https://api.github.com/repos/oozcitak/xmlbuilder-js","labels_url":"https://api.github.com/repos/oozcitak/xmlbuilder-js/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/oozcitak/xmlbuilder-js/issues/147/comments","events_url":"https://api.github.com/repos/oozcitak/xmlbuilder-js/issues/147/events","html_url":"https://github.com/oozcitak/xmlbuilder-js/issues/147","id":195949326,"number":147,"title":"Character causes invalid character error","user":{"login":"willm","id":771001,"avatar_url":"https://avatars.githubusercontent.com/u/771001?v=3","gravatar_id":"","url":"https://api.github.com/users/willm","html_url":"https://github.com/willm","followers_url":"https://api.github.com/users/willm/followers","following_url":"https://api.github.com/users/willm/following{/other_user}","gists_url":"https://api.github.com/users/willm/gists{/gist_id}","starred_url":"https://api.github.com/users/willm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willm/subscriptions","organizations_url":"https://api.github.com/users/willm/orgs","repos_url":"https://api.github.com/users/willm/repos","events_url":"https://api.github.com/users/willm/events{/privacy}","received_events_url":"https://api.github.com/users/willm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-16T00:04:43Z","updated_at":"2016-12-30T12:03:45Z","closed_at":null,"body":"I had an issue with a module consuming this one, and I found that the problem boils down to this test whch throws the following error. Is this a bug or is it intentional?\r\n\r\n```javascript\r\nvar xmlbuilder = require('xmlbuilder');\r\nvar rootXml = xmlbuilder.create('root');\r\nrootXml.ele('test', '\\u0000');\r\nconsole.log(rootXml.end({}));\r\n```\r\n\r\n/lib/XMLStringifier.js:148\r\n        throw new Error(\"Invalid character (\" + chr + \") in string: \" + str + \" at index \" + chr.index);\r\n        ^\r\n\r\nError: Invalid character (\r\n"},"comment":{"url":"https://api.github.com/repos/oozcitak/xmlbuilder-js/issues/comments/269764231","html_url":"https://github.com/oozcitak/xmlbuilder-js/issues/147#issuecomment-269764231","issue_url":"https://api.github.com/repos/oozcitak/xmlbuilder-js/issues/147","id":269764231,"user":{"login":"willm","id":771001,"avatar_url":"https://avatars.githubusercontent.com/u/771001?v=3","gravatar_id":"","url":"https://api.github.com/users/willm","html_url":"https://github.com/willm","followers_url":"https://api.github.com/users/willm/followers","following_url":"https://api.github.com/users/willm/following{/other_user}","gists_url":"https://api.github.com/users/willm/gists{/gist_id}","starred_url":"https://api.github.com/users/willm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willm/subscriptions","organizations_url":"https://api.github.com/users/willm/orgs","repos_url":"https://api.github.com/users/willm/repos","events_url":"https://api.github.com/users/willm/events{/privacy}","received_events_url":"https://api.github.com/users/willm/received_events","type":"User","site_admin":false},"created_at":"2016-12-30T12:03:45Z","updated_at":"2016-12-30T12:03:45Z","body":"Thanks I've had a read and didn't realise that some characters were simply invalid in xml! However, shouldn't this library handle this? According to the stack overflow posts you shared, the allowed characters are: \r\n\r\n`#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]`\r\n\r\nDo you think it makes sense for this package to strip any other characters when building an xml? Or do you think this is up to each consumer to handle?"}}
{"actor":{"display_login":"willm"}}