{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/pulls/comments/36414544","id":36414544,"diff_hunk":"@@ -0,0 +1,115 @@\n+/* This Source Code Form is subject to the terms of the Mozilla Public\n+ * License, v. 2.0. If a copy of the MPL was not distributed with this\n+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n+\n+module.exports = function (grunt) {\n+  grunt.registerTask('scan-email-translations', 'Scan the generated emails for invalid style tags', [\n+    'generate-valid-styles',\n+    'po2json',\n+    'verify-styles'\n+    ]\n+  );\n+\n+  grunt.registerMultiTask('verify-styles', 'Verify whether the translated styles are valid', function (){\n+    var options = this.options({\n+      validStyles: []\n+    });\n+    var styleArray = options.validStyles;\n+\n+    var fileArray = this.files[0].src;\n+\n+    var hasErrors = 0;\n+    var styleRegex = /style=\"[\\s\\S]*?\"/ig;","path":"grunttasks/scan-email-translations.js","position":22,"original_position":22,"commit_id":"6c83e215eaabef214b6a728f109268ea38e929b6","original_commit_id":"6c83e215eaabef214b6a728f109268ea38e929b6","user":{"login":"shane-tomlinson","id":848085,"avatar_url":"https://avatars.githubusercontent.com/u/848085?v=3","gravatar_id":"","url":"https://api.github.com/users/shane-tomlinson","html_url":"https://github.com/shane-tomlinson","followers_url":"https://api.github.com/users/shane-tomlinson/followers","following_url":"https://api.github.com/users/shane-tomlinson/following{/other_user}","gists_url":"https://api.github.com/users/shane-tomlinson/gists{/gist_id}","starred_url":"https://api.github.com/users/shane-tomlinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shane-tomlinson/subscriptions","organizations_url":"https://api.github.com/users/shane-tomlinson/orgs","repos_url":"https://api.github.com/users/shane-tomlinson/repos","events_url":"https://api.github.com/users/shane-tomlinson/events{/privacy}","received_events_url":"https://api.github.com/users/shane-tomlinson/received_events","type":"User","site_admin":false},"body":"What happens if the translator used a `'` instead of a `\"`, this regexp would let the style through unchecked.","created_at":"2015-08-06T13:39:35Z","updated_at":"2015-08-06T13:39:35Z","html_url":"https://github.com/mozilla/fxa-content-server-l10n/pull/62#discussion_r36414544","pull_request_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/pulls/62","_links":{"self":{"href":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/pulls/comments/36414544"},"html":{"href":"https://github.com/mozilla/fxa-content-server-l10n/pull/62#discussion_r36414544"},"pull_request":{"href":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/pulls/62"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/pulls/62","id":40959047,"html_url":"https://github.com/mozilla/fxa-content-server-l10n/pull/62","diff_url":"https://github.com/mozilla/fxa-content-server-l10n/pull/62.diff","patch_url":"https://github.com/mozilla/fxa-content-server-l10n/pull/62.patch","issue_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/issues/62","number":62,"state":"open","locked":false,"title":"feat(client): scan emails for invalid style attr","user":{"login":"TDA","id":432707,"avatar_url":"https://avatars.githubusercontent.com/u/432707?v=3","gravatar_id":"","url":"https://api.github.com/users/TDA","html_url":"https://github.com/TDA","followers_url":"https://api.github.com/users/TDA/followers","following_url":"https://api.github.com/users/TDA/following{/other_user}","gists_url":"https://api.github.com/users/TDA/gists{/gist_id}","starred_url":"https://api.github.com/users/TDA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TDA/subscriptions","organizations_url":"https://api.github.com/users/TDA/orgs","repos_url":"https://api.github.com/users/TDA/repos","events_url":"https://api.github.com/users/TDA/events{/privacy}","received_events_url":"https://api.github.com/users/TDA/received_events","type":"User","site_admin":false},"body":"Add grunt to l10n repo\r\nAdd a grunt task to scan for invalid style attributes\r\nFixes #67 in auth-mailer repo\r\nhttps://github.com/mozilla/fxa-auth-mailer/issues/67\r\n@vladikoff \r\n@pdehaan ","created_at":"2015-07-27T22:56:16Z","updated_at":"2015-08-06T13:39:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f6da362f49b02167dc67b8e9ecd37e47b361771","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/pulls/62/commits","review_comments_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/pulls/62/comments","review_comment_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/issues/62/comments","statuses_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/statuses/6c83e215eaabef214b6a728f109268ea38e929b6","head":{"label":"TDA:master","ref":"master","sha":"6c83e215eaabef214b6a728f109268ea38e929b6","user":{"login":"TDA","id":432707,"avatar_url":"https://avatars.githubusercontent.com/u/432707?v=3","gravatar_id":"","url":"https://api.github.com/users/TDA","html_url":"https://github.com/TDA","followers_url":"https://api.github.com/users/TDA/followers","following_url":"https://api.github.com/users/TDA/following{/other_user}","gists_url":"https://api.github.com/users/TDA/gists{/gist_id}","starred_url":"https://api.github.com/users/TDA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TDA/subscriptions","organizations_url":"https://api.github.com/users/TDA/orgs","repos_url":"https://api.github.com/users/TDA/repos","events_url":"https://api.github.com/users/TDA/events{/privacy}","received_events_url":"https://api.github.com/users/TDA/received_events","type":"User","site_admin":false},"repo":{"id":39801831,"name":"fxa-content-server-l10n","full_name":"TDA/fxa-content-server-l10n","owner":{"login":"TDA","id":432707,"avatar_url":"https://avatars.githubusercontent.com/u/432707?v=3","gravatar_id":"","url":"https://api.github.com/users/TDA","html_url":"https://github.com/TDA","followers_url":"https://api.github.com/users/TDA/followers","following_url":"https://api.github.com/users/TDA/following{/other_user}","gists_url":"https://api.github.com/users/TDA/gists{/gist_id}","starred_url":"https://api.github.com/users/TDA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TDA/subscriptions","organizations_url":"https://api.github.com/users/TDA/orgs","repos_url":"https://api.github.com/users/TDA/repos","events_url":"https://api.github.com/users/TDA/events{/privacy}","received_events_url":"https://api.github.com/users/TDA/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TDA/fxa-content-server-l10n","description":"translated strings for fxa-content-server","fork":true,"url":"https://api.github.com/repos/TDA/fxa-content-server-l10n","forks_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/forks","keys_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/teams","hooks_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/hooks","issue_events_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/issues/events{/number}","events_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/events","assignees_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/assignees{/user}","branches_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/branches{/branch}","tags_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/tags","blobs_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/git/refs{/sha}","trees_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/statuses/{sha}","languages_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/languages","stargazers_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/stargazers","contributors_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/contributors","subscribers_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/subscribers","subscription_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/subscription","commits_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/commits{/sha}","git_commits_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/git/commits{/sha}","comments_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/comments{/number}","issue_comment_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/issues/comments{/number}","contents_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/contents/{+path}","compare_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/merges","archive_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/downloads","issues_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/issues{/number}","pulls_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/pulls{/number}","milestones_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/milestones{/number}","notifications_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/labels{/name}","releases_url":"https://api.github.com/repos/TDA/fxa-content-server-l10n/releases{/id}","created_at":"2015-07-27T22:54:34Z","updated_at":"2015-07-28T20:02:35Z","pushed_at":"2015-07-30T00:17:39Z","git_url":"git://github.com/TDA/fxa-content-server-l10n.git","ssh_url":"git@github.com:TDA/fxa-content-server-l10n.git","clone_url":"https://github.com/TDA/fxa-content-server-l10n.git","svn_url":"https://github.com/TDA/fxa-content-server-l10n","homepage":null,"size":6789,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"mozilla:master","ref":"master","sha":"ccd87e66f68ada974edab48002584102e784b324","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":17193734,"name":"fxa-content-server-l10n","full_name":"mozilla/fxa-content-server-l10n","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/fxa-content-server-l10n","description":"translated strings for fxa-content-server","fork":false,"url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n","forks_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/forks","keys_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/teams","hooks_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/hooks","issue_events_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/events","assignees_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/tags","blobs_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/languages","stargazers_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/stargazers","contributors_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/contributors","subscribers_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/subscribers","subscription_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/subscription","commits_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/merges","archive_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/downloads","issues_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/releases{/id}","created_at":"2014-02-26T00:45:33Z","updated_at":"2015-07-22T08:42:01Z","pushed_at":"2015-08-06T11:12:47Z","git_url":"git://github.com/mozilla/fxa-content-server-l10n.git","ssh_url":"git@github.com:mozilla/fxa-content-server-l10n.git","clone_url":"https://github.com/mozilla/fxa-content-server-l10n.git","svn_url":"https://github.com/mozilla/fxa-content-server-l10n","homepage":null,"size":9715,"stargazers_count":4,"watchers_count":4,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":7,"forks":11,"open_issues":7,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/pulls/62"},"html":{"href":"https://github.com/mozilla/fxa-content-server-l10n/pull/62"},"issue":{"href":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/issues/62"},"comments":{"href":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/issues/62/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/pulls/62/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/pulls/62/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/fxa-content-server-l10n/statuses/6c83e215eaabef214b6a728f109268ea38e929b6"}}}}