{"action":"created","issue":{"url":"https://api.github.com/repos/jonatkins/ingress-intel-total-conversion/issues/829","labels_url":"https://api.github.com/repos/jonatkins/ingress-intel-total-conversion/issues/829/labels{/name}","comments_url":"https://api.github.com/repos/jonatkins/ingress-intel-total-conversion/issues/829/comments","events_url":"https://api.github.com/repos/jonatkins/ingress-intel-total-conversion/issues/829/events","html_url":"https://github.com/jonatkins/ingress-intel-total-conversion/issues/829","id":37851090,"number":829,"title":"Escape portal's address in Chat links","user":{"login":"user890104","id":3518994,"avatar_url":"https://avatars.githubusercontent.com/u/3518994?v=3","gravatar_id":"","url":"https://api.github.com/users/user890104","html_url":"https://github.com/user890104","followers_url":"https://api.github.com/users/user890104/followers","following_url":"https://api.github.com/users/user890104/following{/other_user}","gists_url":"https://api.github.com/users/user890104/gists{/gist_id}","starred_url":"https://api.github.com/users/user890104/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/user890104/subscriptions","organizations_url":"https://api.github.com/users/user890104/orgs","repos_url":"https://api.github.com/users/user890104/repos","events_url":"https://api.github.com/users/user890104/events{/privacy}","received_events_url":"https://api.github.com/users/user890104/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-07-15T04:47:04Z","updated_at":"2015-10-13T20:47:45Z","closed_at":null,"body":"Currently, any portal link in chat that contain a quotation mark in the street address (e.g. 34 \"Main\" Street) is broken. Title is truncated to the first quotation mark, and the rest are parsed as HTML attributes.\r\nFix:\r\nin function chat.writeDataToHash, replace:\r\n\r\n    msg += '<a onclick=\"'+js+'\"'\r\n          + ' title=\"'+markup[1].address+'\"'\r\n          + ' href=\"'+perma+'\" class=\"help\">'\r\n          + window.chat.getChatPortalName(markup[1])\r\n          + '</a>';\r\n\r\nwith:\r\n\r\n    var el = document.createElement('span');\r\n        el.textContent = markup[1].address;\r\n        \r\n        msg += '<a onclick=\"'+js+'\"'\r\n          + ' title=\"'+el.innerHTML.replace(/\"/g, '&quot;')+'\"'\r\n          + ' href=\"'+perma+'\" class=\"help\">'\r\n          + window.chat.getChatPortalName(markup[1])\r\n          + '</a>';\r\n\r\nIt should also escape other HTML special characters (less-than, greater-than, etc.)\r\nTested on Firefox 30 (GM)"},"comment":{"url":"https://api.github.com/repos/jonatkins/ingress-intel-total-conversion/issues/comments/147848250","html_url":"https://github.com/jonatkins/ingress-intel-total-conversion/issues/829#issuecomment-147848250","issue_url":"https://api.github.com/repos/jonatkins/ingress-intel-total-conversion/issues/829","id":147848250,"user":{"login":"MarekKnapek","id":13893067,"avatar_url":"https://avatars.githubusercontent.com/u/13893067?v=3","gravatar_id":"","url":"https://api.github.com/users/MarekKnapek","html_url":"https://github.com/MarekKnapek","followers_url":"https://api.github.com/users/MarekKnapek/followers","following_url":"https://api.github.com/users/MarekKnapek/following{/other_user}","gists_url":"https://api.github.com/users/MarekKnapek/gists{/gist_id}","starred_url":"https://api.github.com/users/MarekKnapek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarekKnapek/subscriptions","organizations_url":"https://api.github.com/users/MarekKnapek/orgs","repos_url":"https://api.github.com/users/MarekKnapek/repos","events_url":"https://api.github.com/users/MarekKnapek/events{/privacy}","received_events_url":"https://api.github.com/users/MarekKnapek/received_events","type":"User","site_admin":false},"created_at":"2015-10-13T20:47:45Z","updated_at":"2015-10-13T20:47:45Z","body":"Created pull request: https://github.com/jonatkins/ingress-intel-total-conversion/pull/1063"}}