{"action":"created","issue":{"url":"https://api.github.com/repos/wicketstuff/core/issues/417","labels_url":"https://api.github.com/repos/wicketstuff/core/issues/417/labels{/name}","comments_url":"https://api.github.com/repos/wicketstuff/core/issues/417/comments","events_url":"https://api.github.com/repos/wicketstuff/core/issues/417/events","html_url":"https://github.com/wicketstuff/core/issues/417","id":98573993,"number":417,"title":"addOverlay/GMarker/GMarkerOptions error if marker title contains special characters (e.g. \\r, \\n, \")","user":{"login":"ceefour","id":24123,"avatar_url":"https://avatars.githubusercontent.com/u/24123?v=3","gravatar_id":"","url":"https://api.github.com/users/ceefour","html_url":"https://github.com/ceefour","followers_url":"https://api.github.com/users/ceefour/followers","following_url":"https://api.github.com/users/ceefour/following{/other_user}","gists_url":"https://api.github.com/users/ceefour/gists{/gist_id}","starred_url":"https://api.github.com/users/ceefour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceefour/subscriptions","organizations_url":"https://api.github.com/users/ceefour/orgs","repos_url":"https://api.github.com/users/ceefour/repos","events_url":"https://api.github.com/users/ceefour/events{/privacy}","received_events_url":"https://api.github.com/users/ceefour/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-02T01:22:40Z","updated_at":"2015-08-30T18:04:58Z","closed_at":"2015-08-30T16:59:26Z","body":"For example, this string: (including the new line)\r\n\r\n    @mochram: Jalan Lb Linggau - Tebingtinggi berkelok & ada bberapa ruas rusak. Harap hati2.\r\n    #ArusBalik @RadioElshinta\r\n\r\nresults in :\r\n\r\n![image](https://cloud.githubusercontent.com/assets/24123/9024256/4f3a210a-38ef-11e5-99de-551c32bd7c18.png)\r\n\r\n![image](https://cloud.githubusercontent.com/assets/24123/9024261/a0f09e52-38ef-11e5-96c0-89edcab243b0.png)\r\n\r\nDouble-quote (\") also results in invalid JavaScript:\r\n\r\n```javascript\r\n\r\nWicket.maps['map12c'].addOverlay('overlay283', new google.maps.Marker({map: Wicket.maps['map12c'].map, position: new google.maps.LatLng(-6.47753, 106.74426, false), icon: (function() {\r\nvar icon = {\r\nurl: '/road_sign/broken.png',\r\nsize: new google.maps.Size(32.0, 32.0),\r\nanchor: new google.maps.Point(15.0, 15.0),\r\n}\r\nreturn icon;\r\n})()\r\n, title: \"@sugiono_69: Janji2 melulu RT\"@KompasTV: Bupati Bogor Janji Perbaiki Jalan Rusak http://t.co/Yt5QxjcQHl\"\"}));\r\nWicket.maps['map12c'].overlays['overlay283'].setMap(Wicket.maps['map12c'].map);\r\n```"},"comment":{"url":"https://api.github.com/repos/wicketstuff/core/issues/comments/136164378","html_url":"https://github.com/wicketstuff/core/issues/417#issuecomment-136164378","issue_url":"https://api.github.com/repos/wicketstuff/core/issues/417","id":136164378,"user":{"login":"ceefour","id":24123,"avatar_url":"https://avatars.githubusercontent.com/u/24123?v=3","gravatar_id":"","url":"https://api.github.com/users/ceefour","html_url":"https://github.com/ceefour","followers_url":"https://api.github.com/users/ceefour/followers","following_url":"https://api.github.com/users/ceefour/following{/other_user}","gists_url":"https://api.github.com/users/ceefour/gists{/gist_id}","starred_url":"https://api.github.com/users/ceefour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceefour/subscriptions","organizations_url":"https://api.github.com/users/ceefour/orgs","repos_url":"https://api.github.com/users/ceefour/repos","events_url":"https://api.github.com/users/ceefour/events{/privacy}","received_events_url":"https://api.github.com/users/ceefour/received_events","type":"User","site_admin":false},"created_at":"2015-08-30T18:04:58Z","updated_at":"2015-08-30T18:04:58Z","body":"Thanks @JoachimRohde, but I beg to disagree with resolution.\r\n\r\nIt should escape by default. Most projects use dynamic title from database column, and like me, they were not aware if these aren't escaped by default and thus, their current apps may break intermittently. By escaping by default, you'll fix like 80% apps out there which currently are like this.\r\n\r\nSecond, most Wicket components escape title and body by default. Especially Label, and this one should be treated like Label.\r\n\r\nThird, unescaped by default is not consistent because it still surrounds with quotes. Try using a javascript function or variable inside it, which means it much be unescaped, but then the Java code becomes unnatural because the quotes don' match.\r\n\r\nI agree with the boolean parameter, but the default setting should be reversed."}}