{"action":"created","issue":{"url":"https://api.github.com/repos/opencor/opencor/issues/822","labels_url":"https://api.github.com/repos/opencor/opencor/issues/822/labels{/name}","comments_url":"https://api.github.com/repos/opencor/opencor/issues/822/comments","events_url":"https://api.github.com/repos/opencor/opencor/issues/822/events","html_url":"https://github.com/opencor/opencor/issues/822","id":117463061,"number":822,"title":"\"reformat\" un-escapes HTML entities","user":{"login":"nickerso","id":811244,"avatar_url":"https://avatars.githubusercontent.com/u/811244?v=3","gravatar_id":"","url":"https://api.github.com/users/nickerso","html_url":"https://github.com/nickerso","followers_url":"https://api.github.com/users/nickerso/followers","following_url":"https://api.github.com/users/nickerso/following{/other_user}","gists_url":"https://api.github.com/users/nickerso/gists{/gist_id}","starred_url":"https://api.github.com/users/nickerso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickerso/subscriptions","organizations_url":"https://api.github.com/users/nickerso/orgs","repos_url":"https://api.github.com/users/nickerso/repos","events_url":"https://api.github.com/users/nickerso/events{/privacy}","received_events_url":"https://api.github.com/users/nickerso/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-17T22:12:12Z","updated_at":"2015-11-18T10:28:17Z","closed_at":null,"body":"In the Raw CellML view, if you reformat a document that has escaped HTML entities in it (e.g., in the documentation of https://models.physiomeproject.org/workspace/nash_panfilov_2004/rawfile/2052251f8c2d6a723dba141050904fdede5ff5a8/nash_panfilov_2004.cellml) then these entities are un-escaped in the reformatted file. This makes it an invalid XML file.\r\n\r\nIn the above example, the exact problem is in the link to the pubmed entry which has `&amp;` entities in it prior to the reformat, but they all get converted to raw `&` characters which xmllint then gives the errors:\r\n\r\n    $ xmllint nash_panfilov_2004.cellml \r\n    nash_panfilov_2004.cellml:66: parser error : EntityRef: expecting ';'\r\n    1-522. <ulink url=\"http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db\r\n                                                                               ^\r\n    nash_panfilov_2004.cellml:66: parser error : EntityRef: expecting ';'\r\n    =\"http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids\r\n                                                                               ^\r\n    nash_panfilov_2004.cellml:66: parser error : EntityRef: expecting ';'\r\n    cbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=15142759&dopt\r\n                                                                               ^\r\n\r\nAnd the simulation view in OpenCOR then gives the error: `Error: the model could not be loaded (badxml/66/0//).`"},"comment":{"url":"https://api.github.com/repos/opencor/opencor/issues/comments/157672349","html_url":"https://github.com/opencor/opencor/issues/822#issuecomment-157672349","issue_url":"https://api.github.com/repos/opencor/opencor/issues/822","id":157672349,"user":{"login":"agarny","id":602265,"avatar_url":"https://avatars.githubusercontent.com/u/602265?v=3","gravatar_id":"","url":"https://api.github.com/users/agarny","html_url":"https://github.com/agarny","followers_url":"https://api.github.com/users/agarny/followers","following_url":"https://api.github.com/users/agarny/following{/other_user}","gists_url":"https://api.github.com/users/agarny/gists{/gist_id}","starred_url":"https://api.github.com/users/agarny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agarny/subscriptions","organizations_url":"https://api.github.com/users/agarny/orgs","repos_url":"https://api.github.com/users/agarny/repos","events_url":"https://api.github.com/users/agarny/events{/privacy}","received_events_url":"https://api.github.com/users/agarny/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T10:28:17Z","updated_at":"2015-11-18T10:28:17Z","body":"I can confirm the issue. Sorry for it, I am going to look into it."}}