{"action":"created","issue":{"url":"https://api.github.com/repos/requirejs/requirejs/issues/1559","repository_url":"https://api.github.com/repos/requirejs/requirejs","labels_url":"https://api.github.com/repos/requirejs/requirejs/issues/1559/labels{/name}","comments_url":"https://api.github.com/repos/requirejs/requirejs/issues/1559/comments","events_url":"https://api.github.com/repos/requirejs/requirejs/issues/1559/events","html_url":"https://github.com/requirejs/requirejs/pull/1559","id":164547810,"number":1559,"title":"Fix: support for using require.js in pure XML","user":{"login":"sebastien","id":14598,"avatar_url":"https://avatars.githubusercontent.com/u/14598?v=3","gravatar_id":"","url":"https://api.github.com/users/sebastien","html_url":"https://github.com/sebastien","followers_url":"https://api.github.com/users/sebastien/followers","following_url":"https://api.github.com/users/sebastien/following{/other_user}","gists_url":"https://api.github.com/users/sebastien/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastien/subscriptions","organizations_url":"https://api.github.com/users/sebastien/orgs","repos_url":"https://api.github.com/users/sebastien/repos","events_url":"https://api.github.com/users/sebastien/events{/privacy}","received_events_url":"https://api.github.com/users/sebastien/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/requirejs/requirejs/labels/CLA:%20Valid","name":"CLA: Valid","color":"007700"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-08T14:51:13Z","updated_at":"2016-07-11T17:09:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/requirejs/requirejs/pulls/1559","html_url":"https://github.com/requirejs/requirejs/pull/1559","diff_url":"https://github.com/requirejs/requirejs/pull/1559.diff","patch_url":"https://github.com/requirejs/requirejs/pull/1559.patch"},"body":"`require.js` does not work with pure-XML documents right now. This patch fixes it.\r\n\r\n```\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<Application xmlns:html=\"http://www.w3.org/1999/xhtml\">\r\n\t<html:script type=\"text/javascript\" src=\"http://requirejs.org/docs/release/2.2.0/minified/require.js\" />\r\n        <html:script type=\"text/javascript\">require([\"underscore\"]);</html:script>\r\n</Application>\r\n```\r\n\r\nvs\r\n\r\n```\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<Application xmlns:html=\"http://www.w3.org/1999/xhtml\">\r\n\t<html:script type=\"text/javascript\" src=\"https://raw.githubusercontent.com/sebastien/requirejs/master/require.js\" />\r\n        <html:script type=\"text/javascript\">require([\"underscore\"]);</html:script>\r\n</Application>\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/requirejs/requirejs/issues/comments/231799365","html_url":"https://github.com/requirejs/requirejs/pull/1559#issuecomment-231799365","issue_url":"https://api.github.com/repos/requirejs/requirejs/issues/1559","id":231799365,"user":{"login":"sebastien","id":14598,"avatar_url":"https://avatars.githubusercontent.com/u/14598?v=3","gravatar_id":"","url":"https://api.github.com/users/sebastien","html_url":"https://github.com/sebastien","followers_url":"https://api.github.com/users/sebastien/followers","following_url":"https://api.github.com/users/sebastien/following{/other_user}","gists_url":"https://api.github.com/users/sebastien/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastien/subscriptions","organizations_url":"https://api.github.com/users/sebastien/orgs","repos_url":"https://api.github.com/users/sebastien/repos","events_url":"https://api.github.com/users/sebastien/events{/privacy}","received_events_url":"https://api.github.com/users/sebastien/received_events","type":"User","site_admin":false},"created_at":"2016-07-11T17:09:31Z","updated_at":"2016-07-11T17:09:31Z","body":"I definitely agree with `2)`. For `1)` I think `requirejs` should not fail by default with XML documents -- I would personally consider this a bug to be fixed. Also, using `xhtml:true` is not semantically correct as there might be XML documents that do not use the  `xhtml` namespace. Would that work for you?"}}
{"actor":{"display_login":"sebastien"}}