{"action":"opened","number":18,"pull_request":{"url":"https://api.github.com/repos/aaaaarg/webapp-2013/pulls/18","id":54915115,"html_url":"https://github.com/aaaaarg/webapp-2013/pull/18","diff_url":"https://github.com/aaaaarg/webapp-2013/pull/18.diff","patch_url":"https://github.com/aaaaarg/webapp-2013/pull/18.patch","issue_url":"https://api.github.com/repos/aaaaarg/webapp-2013/issues/18","number":18,"state":"open","locked":false,"title":"coerce markupsafe.Markup objects to unicode strs","user":{"login":"codeforkjeff","id":615941,"avatar_url":"https://avatars.githubusercontent.com/u/615941?v=3","gravatar_id":"","url":"https://api.github.com/users/codeforkjeff","html_url":"https://github.com/codeforkjeff","followers_url":"https://api.github.com/users/codeforkjeff/followers","following_url":"https://api.github.com/users/codeforkjeff/following{/other_user}","gists_url":"https://api.github.com/users/codeforkjeff/gists{/gist_id}","starred_url":"https://api.github.com/users/codeforkjeff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeforkjeff/subscriptions","organizations_url":"https://api.github.com/users/codeforkjeff/orgs","repos_url":"https://api.github.com/users/codeforkjeff/repos","events_url":"https://api.github.com/users/codeforkjeff/events{/privacy}","received_events_url":"https://api.github.com/users/codeforkjeff/received_events","type":"User","site_admin":false},"body":"On my machine, jsonify() does html-escaping of markupsafe.Markup objects (which is what get_template_attribute() returns) when it renders them as strings. The browser chokes on these json responses. This happens when trying to Follow/Unfollow, and when adding a thing to a collection. Oddly enough, this doesn't happen on the live site. I don't know what the difference might be.\r\n\r\nThe fix is to coerce the objects to unicode strings before they reach jsonify().\r\n","created_at":"2016-01-02T23:44:50Z","updated_at":"2016-01-02T23:44:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aaaaarg/webapp-2013/pulls/18/commits","review_comments_url":"https://api.github.com/repos/aaaaarg/webapp-2013/pulls/18/comments","review_comment_url":"https://api.github.com/repos/aaaaarg/webapp-2013/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aaaaarg/webapp-2013/issues/18/comments","statuses_url":"https://api.github.com/repos/aaaaarg/webapp-2013/statuses/c386a46f73b67ad5caea780f6647712dc37f2c2f","head":{"label":"codeforkjeff:fix-escaped-html-in-json-responses","ref":"fix-escaped-html-in-json-responses","sha":"c386a46f73b67ad5caea780f6647712dc37f2c2f","user":{"login":"codeforkjeff","id":615941,"avatar_url":"https://avatars.githubusercontent.com/u/615941?v=3","gravatar_id":"","url":"https://api.github.com/users/codeforkjeff","html_url":"https://github.com/codeforkjeff","followers_url":"https://api.github.com/users/codeforkjeff/followers","following_url":"https://api.github.com/users/codeforkjeff/following{/other_user}","gists_url":"https://api.github.com/users/codeforkjeff/gists{/gist_id}","starred_url":"https://api.github.com/users/codeforkjeff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeforkjeff/subscriptions","organizations_url":"https://api.github.com/users/codeforkjeff/orgs","repos_url":"https://api.github.com/users/codeforkjeff/repos","events_url":"https://api.github.com/users/codeforkjeff/events{/privacy}","received_events_url":"https://api.github.com/users/codeforkjeff/received_events","type":"User","site_admin":false},"repo":{"id":48629324,"name":"webapp-2013","full_name":"codeforkjeff/webapp-2013","owner":{"login":"codeforkjeff","id":615941,"avatar_url":"https://avatars.githubusercontent.com/u/615941?v=3","gravatar_id":"","url":"https://api.github.com/users/codeforkjeff","html_url":"https://github.com/codeforkjeff","followers_url":"https://api.github.com/users/codeforkjeff/followers","following_url":"https://api.github.com/users/codeforkjeff/following{/other_user}","gists_url":"https://api.github.com/users/codeforkjeff/gists{/gist_id}","starred_url":"https://api.github.com/users/codeforkjeff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeforkjeff/subscriptions","organizations_url":"https://api.github.com/users/codeforkjeff/orgs","repos_url":"https://api.github.com/users/codeforkjeff/repos","events_url":"https://api.github.com/users/codeforkjeff/events{/privacy}","received_events_url":"https://api.github.com/users/codeforkjeff/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/codeforkjeff/webapp-2013","description":"","fork":true,"url":"https://api.github.com/repos/codeforkjeff/webapp-2013","forks_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/forks","keys_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/teams","hooks_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/hooks","issue_events_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/issues/events{/number}","events_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/events","assignees_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/assignees{/user}","branches_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/branches{/branch}","tags_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/tags","blobs_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/git/refs{/sha}","trees_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/statuses/{sha}","languages_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/languages","stargazers_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/stargazers","contributors_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/contributors","subscribers_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/subscribers","subscription_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/subscription","commits_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/commits{/sha}","git_commits_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/git/commits{/sha}","comments_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/comments{/number}","issue_comment_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/issues/comments{/number}","contents_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/contents/{+path}","compare_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/merges","archive_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/downloads","issues_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/issues{/number}","pulls_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/pulls{/number}","milestones_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/milestones{/number}","notifications_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/labels{/name}","releases_url":"https://api.github.com/repos/codeforkjeff/webapp-2013/releases{/id}","created_at":"2015-12-27T01:48:25Z","updated_at":"2015-12-27T01:48:27Z","pushed_at":"2016-01-02T23:39:21Z","git_url":"git://github.com/codeforkjeff/webapp-2013.git","ssh_url":"git@github.com:codeforkjeff/webapp-2013.git","clone_url":"https://github.com/codeforkjeff/webapp-2013.git","svn_url":"https://github.com/codeforkjeff/webapp-2013","homepage":null,"size":1764,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"aaaaarg:master","ref":"master","sha":"e9cfe3bb03e9c644a9c317cde76a0b2e49595555","user":{"login":"aaaaarg","id":14053603,"avatar_url":"https://avatars.githubusercontent.com/u/14053603?v=3","gravatar_id":"","url":"https://api.github.com/users/aaaaarg","html_url":"https://github.com/aaaaarg","followers_url":"https://api.github.com/users/aaaaarg/followers","following_url":"https://api.github.com/users/aaaaarg/following{/other_user}","gists_url":"https://api.github.com/users/aaaaarg/gists{/gist_id}","starred_url":"https://api.github.com/users/aaaaarg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaaaarg/subscriptions","organizations_url":"https://api.github.com/users/aaaaarg/orgs","repos_url":"https://api.github.com/users/aaaaarg/repos","events_url":"https://api.github.com/users/aaaaarg/events{/privacy}","received_events_url":"https://api.github.com/users/aaaaarg/received_events","type":"User","site_admin":false},"repo":{"id":41671659,"name":"webapp-2013","full_name":"aaaaarg/webapp-2013","owner":{"login":"aaaaarg","id":14053603,"avatar_url":"https://avatars.githubusercontent.com/u/14053603?v=3","gravatar_id":"","url":"https://api.github.com/users/aaaaarg","html_url":"https://github.com/aaaaarg","followers_url":"https://api.github.com/users/aaaaarg/followers","following_url":"https://api.github.com/users/aaaaarg/following{/other_user}","gists_url":"https://api.github.com/users/aaaaarg/gists{/gist_id}","starred_url":"https://api.github.com/users/aaaaarg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaaaarg/subscriptions","organizations_url":"https://api.github.com/users/aaaaarg/orgs","repos_url":"https://api.github.com/users/aaaaarg/repos","events_url":"https://api.github.com/users/aaaaarg/events{/privacy}","received_events_url":"https://api.github.com/users/aaaaarg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aaaaarg/webapp-2013","description":"","fork":false,"url":"https://api.github.com/repos/aaaaarg/webapp-2013","forks_url":"https://api.github.com/repos/aaaaarg/webapp-2013/forks","keys_url":"https://api.github.com/repos/aaaaarg/webapp-2013/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aaaaarg/webapp-2013/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aaaaarg/webapp-2013/teams","hooks_url":"https://api.github.com/repos/aaaaarg/webapp-2013/hooks","issue_events_url":"https://api.github.com/repos/aaaaarg/webapp-2013/issues/events{/number}","events_url":"https://api.github.com/repos/aaaaarg/webapp-2013/events","assignees_url":"https://api.github.com/repos/aaaaarg/webapp-2013/assignees{/user}","branches_url":"https://api.github.com/repos/aaaaarg/webapp-2013/branches{/branch}","tags_url":"https://api.github.com/repos/aaaaarg/webapp-2013/tags","blobs_url":"https://api.github.com/repos/aaaaarg/webapp-2013/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aaaaarg/webapp-2013/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aaaaarg/webapp-2013/git/refs{/sha}","trees_url":"https://api.github.com/repos/aaaaarg/webapp-2013/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aaaaarg/webapp-2013/statuses/{sha}","languages_url":"https://api.github.com/repos/aaaaarg/webapp-2013/languages","stargazers_url":"https://api.github.com/repos/aaaaarg/webapp-2013/stargazers","contributors_url":"https://api.github.com/repos/aaaaarg/webapp-2013/contributors","subscribers_url":"https://api.github.com/repos/aaaaarg/webapp-2013/subscribers","subscription_url":"https://api.github.com/repos/aaaaarg/webapp-2013/subscription","commits_url":"https://api.github.com/repos/aaaaarg/webapp-2013/commits{/sha}","git_commits_url":"https://api.github.com/repos/aaaaarg/webapp-2013/git/commits{/sha}","comments_url":"https://api.github.com/repos/aaaaarg/webapp-2013/comments{/number}","issue_comment_url":"https://api.github.com/repos/aaaaarg/webapp-2013/issues/comments{/number}","contents_url":"https://api.github.com/repos/aaaaarg/webapp-2013/contents/{+path}","compare_url":"https://api.github.com/repos/aaaaarg/webapp-2013/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aaaaarg/webapp-2013/merges","archive_url":"https://api.github.com/repos/aaaaarg/webapp-2013/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aaaaarg/webapp-2013/downloads","issues_url":"https://api.github.com/repos/aaaaarg/webapp-2013/issues{/number}","pulls_url":"https://api.github.com/repos/aaaaarg/webapp-2013/pulls{/number}","milestones_url":"https://api.github.com/repos/aaaaarg/webapp-2013/milestones{/number}","notifications_url":"https://api.github.com/repos/aaaaarg/webapp-2013/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aaaaarg/webapp-2013/labels{/name}","releases_url":"https://api.github.com/repos/aaaaarg/webapp-2013/releases{/id}","created_at":"2015-08-31T11:23:02Z","updated_at":"2015-12-27T01:48:10Z","pushed_at":"2016-01-02T07:21:23Z","git_url":"git://github.com/aaaaarg/webapp-2013.git","ssh_url":"git@github.com:aaaaarg/webapp-2013.git","clone_url":"https://github.com/aaaaarg/webapp-2013.git","svn_url":"https://github.com/aaaaarg/webapp-2013","homepage":null,"size":1761,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":8,"forks":1,"open_issues":8,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aaaaarg/webapp-2013/pulls/18"},"html":{"href":"https://github.com/aaaaarg/webapp-2013/pull/18"},"issue":{"href":"https://api.github.com/repos/aaaaarg/webapp-2013/issues/18"},"comments":{"href":"https://api.github.com/repos/aaaaarg/webapp-2013/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/aaaaarg/webapp-2013/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/aaaaarg/webapp-2013/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aaaaarg/webapp-2013/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/aaaaarg/webapp-2013/statuses/c386a46f73b67ad5caea780f6647712dc37f2c2f"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":5,"deletions":5,"changed_files":3}}