{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/comments/67162188","id":67162188,"diff_hunk":"@@ -143,10 +174,10 @@\n                 if (xhr.status === 400) {\n                     try {\n                         var errors = JSON.parse(xhr.responseText),\n-                            validationErrorMessage = _.escape(\n+                            validationErrorMessage = HtmlUtils.ensureHtml(","path":"lms/static/js/views/fields.js","position":114,"original_position":114,"commit_id":"3bcf3c7b86ec01e2f3082d1a1ab63c5abe3edceb","original_commit_id":"3bcf3c7b86ec01e2f3082d1a1ab63c5abe3edceb","user":{"login":"robrap","id":14576445,"avatar_url":"https://avatars.githubusercontent.com/u/14576445?v=3","gravatar_id":"","url":"https://api.github.com/users/robrap","html_url":"https://github.com/robrap","followers_url":"https://api.github.com/users/robrap/followers","following_url":"https://api.github.com/users/robrap/following{/other_user}","gists_url":"https://api.github.com/users/robrap/gists{/gist_id}","starred_url":"https://api.github.com/users/robrap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robrap/subscriptions","organizations_url":"https://api.github.com/users/robrap/orgs","repos_url":"https://api.github.com/users/robrap/repos","events_url":"https://api.github.com/users/robrap/events{/privacy}","received_events_url":"https://api.github.com/users/robrap/received_events","type":"User","site_admin":false},"body":"You don't need ensure here, because joinHtml() below will take care of escaping.  Instead, just use:\r\n```\r\nvalidationErrorMessage = errors.field_errors[this.options.valueAttribute].user_message;\r\n```\r\nThis whole line could go away and be inlined in the other call, but I think the variable name gives a nice comment for the code without adding a comment, which can be a nice practice.","created_at":"2016-06-15T13:36:56Z","updated_at":"2016-06-15T13:36:56Z","html_url":"https://github.com/edx/edx-platform/pull/12741#discussion_r67162188","pull_request_url":"https://api.github.com/repos/edx/edx-platform/pulls/12741","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments/67162188"},"html":{"href":"https://github.com/edx/edx-platform/pull/12741#discussion_r67162188"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/12741"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/12741","id":73645491,"html_url":"https://github.com/edx/edx-platform/pull/12741","diff_url":"https://github.com/edx/edx-platform/pull/12741.diff","patch_url":"https://github.com/edx/edx-platform/pull/12741.patch","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/12741","number":12741,"state":"open","locked":false,"title":"Safe Template Errors Fixes","user":{"login":"kevinjkim","id":14193378,"avatar_url":"https://avatars.githubusercontent.com/u/14193378?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinjkim","html_url":"https://github.com/kevinjkim","followers_url":"https://api.github.com/users/kevinjkim/followers","following_url":"https://api.github.com/users/kevinjkim/following{/other_user}","gists_url":"https://api.github.com/users/kevinjkim/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinjkim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinjkim/subscriptions","organizations_url":"https://api.github.com/users/kevinjkim/orgs","repos_url":"https://api.github.com/users/kevinjkim/repos","events_url":"https://api.github.com/users/kevinjkim/events{/privacy}","received_events_url":"https://api.github.com/users/kevinjkim/received_events","type":"User","site_admin":false},"body":"### Description\r\n \r\n[TNL-4796](https://openedx.atlassian.net/browse/TNL-4796)\r\n\r\nChanges to fix the safe template errors in the user account settings/preferences page.\r\n\r\n### Sandbox\r\n- [ ] Build a sandbox for your branch and add a link here\r\n\r\n### Testing\r\n- [ ] safecommit shows 0 violations\r\n- [ ] Unit, integration, acceptance tests as appropriate\r\n\r\n### Reviewers\r\nIf you've been tagged for review, please check your corresponding box once you've given the :+1:.\r\n- [ ] Code review: @jcdyer \r\n- [ ] Code review: @efischer19 \r\n\r\n### Devops assistance\r\nDon't think I need this\r\n\r\nFYI: @robrap \r\n\r\n### Post-review\r\n- [ ] Squash commits","created_at":"2016-06-13T21:22:10Z","updated_at":"2016-06-15T13:36:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b2f06ed75f31f3b1215487fbf36d6c6bf5c8fe5e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-platform/pulls/12741/commits","review_comments_url":"https://api.github.com/repos/edx/edx-platform/pulls/12741/comments","review_comment_url":"https://api.github.com/repos/edx/edx-platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-platform/issues/12741/comments","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/3bcf3c7b86ec01e2f3082d1a1ab63c5abe3edceb","head":{"label":"edx:kkim/safe_template","ref":"kkim/safe_template","sha":"3bcf3c7b86ec01e2f3082d1a1ab63c5abe3edceb","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":10391073,"name":"edx-platform","full_name":"edx/edx-platform","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-platform","description":"The Open edX platform, the software that powers edX!","fork":false,"url":"https://api.github.com/repos/edx/edx-platform","forks_url":"https://api.github.com/repos/edx/edx-platform/forks","keys_url":"https://api.github.com/repos/edx/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-platform/teams","hooks_url":"https://api.github.com/repos/edx/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-platform/events","assignees_url":"https://api.github.com/repos/edx/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-platform/tags","blobs_url":"https://api.github.com/repos/edx/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-platform/languages","stargazers_url":"https://api.github.com/repos/edx/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-platform/subscription","commits_url":"https://api.github.com/repos/edx/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-platform/merges","archive_url":"https://api.github.com/repos/edx/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-platform/downloads","issues_url":"https://api.github.com/repos/edx/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-platform/releases{/id}","deployments_url":"https://api.github.com/repos/edx/edx-platform/deployments","created_at":"2013-05-30T20:20:38Z","updated_at":"2016-06-15T11:24:56Z","pushed_at":"2016-06-15T13:26:45Z","git_url":"git://github.com/edx/edx-platform.git","ssh_url":"git@github.com:edx/edx-platform.git","clone_url":"https://github.com/edx/edx-platform.git","svn_url":"https://github.com/edx/edx-platform","homepage":"http://open.edx.org/","size":768512,"stargazers_count":2624,"watchers_count":2624,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1594,"mirror_url":null,"open_issues_count":165,"forks":1594,"open_issues":165,"watchers":2624,"default_branch":"master"}},"base":{"label":"edx:kkim/tz_pref_AS","ref":"kkim/tz_pref_AS","sha":"e33a578d68c6eedf988df3a5b351e94cb69c30eb","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":10391073,"name":"edx-platform","full_name":"edx/edx-platform","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-platform","description":"The Open edX platform, the software that powers edX!","fork":false,"url":"https://api.github.com/repos/edx/edx-platform","forks_url":"https://api.github.com/repos/edx/edx-platform/forks","keys_url":"https://api.github.com/repos/edx/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-platform/teams","hooks_url":"https://api.github.com/repos/edx/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-platform/events","assignees_url":"https://api.github.com/repos/edx/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-platform/tags","blobs_url":"https://api.github.com/repos/edx/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-platform/languages","stargazers_url":"https://api.github.com/repos/edx/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-platform/subscription","commits_url":"https://api.github.com/repos/edx/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-platform/merges","archive_url":"https://api.github.com/repos/edx/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-platform/downloads","issues_url":"https://api.github.com/repos/edx/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-platform/releases{/id}","deployments_url":"https://api.github.com/repos/edx/edx-platform/deployments","created_at":"2013-05-30T20:20:38Z","updated_at":"2016-06-15T11:24:56Z","pushed_at":"2016-06-15T13:26:45Z","git_url":"git://github.com/edx/edx-platform.git","ssh_url":"git@github.com:edx/edx-platform.git","clone_url":"https://github.com/edx/edx-platform.git","svn_url":"https://github.com/edx/edx-platform","homepage":"http://open.edx.org/","size":768512,"stargazers_count":2624,"watchers_count":2624,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1594,"mirror_url":null,"open_issues_count":165,"forks":1594,"open_issues":165,"watchers":2624,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/12741"},"html":{"href":"https://github.com/edx/edx-platform/pull/12741"},"issue":{"href":"https://api.github.com/repos/edx/edx-platform/issues/12741"},"comments":{"href":"https://api.github.com/repos/edx/edx-platform/issues/12741/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/12741/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/12741/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-platform/statuses/3bcf3c7b86ec01e2f3082d1a1ab63c5abe3edceb"}}}}
{"actor":{"display_login":"robrap"}}