{"action":"created","issue":{"url":"https://api.github.com/repos/coresecure/Adobe-CQ5-Brightcove-Connector/issues/18","repository_url":"https://api.github.com/repos/coresecure/Adobe-CQ5-Brightcove-Connector","labels_url":"https://api.github.com/repos/coresecure/Adobe-CQ5-Brightcove-Connector/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/coresecure/Adobe-CQ5-Brightcove-Connector/issues/18/comments","events_url":"https://api.github.com/repos/coresecure/Adobe-CQ5-Brightcove-Connector/issues/18/events","html_url":"https://github.com/coresecure/Adobe-CQ5-Brightcove-Connector/issues/18","id":175892001,"number":18,"title":"Malformed JSON in long_description","user":{"login":"andyshreve","id":1396172,"avatar_url":"https://avatars.githubusercontent.com/u/1396172?v=3","gravatar_id":"","url":"https://api.github.com/users/andyshreve","html_url":"https://github.com/andyshreve","followers_url":"https://api.github.com/users/andyshreve/followers","following_url":"https://api.github.com/users/andyshreve/following{/other_user}","gists_url":"https://api.github.com/users/andyshreve/gists{/gist_id}","starred_url":"https://api.github.com/users/andyshreve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyshreve/subscriptions","organizations_url":"https://api.github.com/users/andyshreve/orgs","repos_url":"https://api.github.com/users/andyshreve/repos","events_url":"https://api.github.com/users/andyshreve/events{/privacy}","received_events_url":"https://api.github.com/users/andyshreve/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-08T23:41:44Z","updated_at":"2016-10-13T06:40:41Z","closed_at":null,"body":"When a video's long description contains the html for an image, the image's attribute values are mixed up in the connector's JSON response and the JSON becomes malformed and unparseable by javascript. \r\n\r\nAn AEM request to /bin/brightcove/api?a=5&start=0&limit=20&_charset_=utf-8&isID=false&query=[my video id]&account_id=[my account id] will return the following malformed JSON:\r\n\r\n`\"long_description\": \"<br/>\\n<img src=\"\\\" alt=\"http://www.my-site.com/apps/webnet/img/twitter_logo_blue.png\\\\\" height=\"Twitter Logo\\\\\" width=\"18\\\\\"/>\"`\r\n\r\nThe JSON response is well-formed when Brightcove's API at http://api.brightcove.com/services/library?command=find_video_by_id&video_id=[my video id]&token=[my token] is called directly: \r\n\r\n`\"longDescription\": \"<br/>\\n<img src=\\\"http://www.my-site.com/apps/webnet/img/twitter_logo_blue.png\\\" alt=\\\"Twitter Logo\\\" height=\\\"18\\\" width=\\\"23\\\"/>\"`\r\n\r\nThis malformed JSON prevents the video search field from working reliably in the AEM Content Finder and the video component dialog. "},"comment":{"url":"https://api.github.com/repos/coresecure/Adobe-CQ5-Brightcove-Connector/issues/comments/253427432","html_url":"https://github.com/coresecure/Adobe-CQ5-Brightcove-Connector/issues/18#issuecomment-253427432","issue_url":"https://api.github.com/repos/coresecure/Adobe-CQ5-Brightcove-Connector/issues/18","id":253427432,"user":{"login":"yan-kisen","id":1116995,"avatar_url":"https://avatars.githubusercontent.com/u/1116995?v=3","gravatar_id":"","url":"https://api.github.com/users/yan-kisen","html_url":"https://github.com/yan-kisen","followers_url":"https://api.github.com/users/yan-kisen/followers","following_url":"https://api.github.com/users/yan-kisen/following{/other_user}","gists_url":"https://api.github.com/users/yan-kisen/gists{/gist_id}","starred_url":"https://api.github.com/users/yan-kisen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yan-kisen/subscriptions","organizations_url":"https://api.github.com/users/yan-kisen/orgs","repos_url":"https://api.github.com/users/yan-kisen/repos","events_url":"https://api.github.com/users/yan-kisen/events{/privacy}","received_events_url":"https://api.github.com/users/yan-kisen/received_events","type":"User","site_admin":false},"created_at":"2016-10-13T06:40:41Z","updated_at":"2016-10-13T06:40:41Z","body":"Good find. Next chance I have, I will verify and update the response writer to properly escape JSON."}}
{"actor":{"display_login":"yan-kisen"}}