{"action":"created","comment":{"url":"https://api.github.com/repos/jjriv/emogrifier/pulls/comments/52116635","id":52116635,"diff_hunk":"@@ -2067,4 +2067,20 @@ public function emogrifierNotMapsCssToHtmlIfFeatureIsNotEnabled()\n             $html\n         );\n     }\n+ \n+    /**\n+     * @test\n+     */\n+    public function emogrifierMapsClassWithLineFeedInAttrib()\n+    {\n+        $css = '.test {color: red;}';\n+        $this->subject->setHtml($this->html5DocumentType . \"<html><body><div class='test\\n'></div></body></html>\");\n+        $this->subject->setCss($css);\n+\n+        $html = $this->subject->emogrify();\n+\n+\tself::assertContains('style=\"color: red;', $html );","path":"Tests/Unit/EmogrifierTest.php","position":16,"original_position":16,"commit_id":"4574c576016125ed583d5322662684d9ecbbc1ab","original_commit_id":"4574c576016125ed583d5322662684d9ecbbc1ab","user":{"login":"oliverklee","id":765746,"avatar_url":"https://avatars.githubusercontent.com/u/765746?v=3","gravatar_id":"","url":"https://api.github.com/users/oliverklee","html_url":"https://github.com/oliverklee","followers_url":"https://api.github.com/users/oliverklee/followers","following_url":"https://api.github.com/users/oliverklee/following{/other_user}","gists_url":"https://api.github.com/users/oliverklee/gists{/gist_id}","starred_url":"https://api.github.com/users/oliverklee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliverklee/subscriptions","organizations_url":"https://api.github.com/users/oliverklee/orgs","repos_url":"https://api.github.com/users/oliverklee/repos","events_url":"https://api.github.com/users/oliverklee/events{/privacy}","received_events_url":"https://api.github.com/users/oliverklee/received_events","type":"User","site_admin":false},"body":"Could you please add the closing quote, too?","created_at":"2016-02-07T12:25:18Z","updated_at":"2016-02-07T12:25:18Z","html_url":"https://github.com/jjriv/emogrifier/pull/298#discussion_r52116635","pull_request_url":"https://api.github.com/repos/jjriv/emogrifier/pulls/298","_links":{"self":{"href":"https://api.github.com/repos/jjriv/emogrifier/pulls/comments/52116635"},"html":{"href":"https://github.com/jjriv/emogrifier/pull/298#discussion_r52116635"},"pull_request":{"href":"https://api.github.com/repos/jjriv/emogrifier/pulls/298"}}},"pull_request":{"url":"https://api.github.com/repos/jjriv/emogrifier/pulls/298","id":58538013,"html_url":"https://github.com/jjriv/emogrifier/pull/298","diff_url":"https://github.com/jjriv/emogrifier/pull/298.diff","patch_url":"https://github.com/jjriv/emogrifier/pull/298.patch","issue_url":"https://api.github.com/repos/jjriv/emogrifier/issues/298","number":298,"state":"open","locked":false,"title":"Add normalize-space to compare class values correctly and test","user":{"login":"mikeswain","id":5952511,"avatar_url":"https://avatars.githubusercontent.com/u/5952511?v=3","gravatar_id":"","url":"https://api.github.com/users/mikeswain","html_url":"https://github.com/mikeswain","followers_url":"https://api.github.com/users/mikeswain/followers","following_url":"https://api.github.com/users/mikeswain/following{/other_user}","gists_url":"https://api.github.com/users/mikeswain/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeswain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeswain/subscriptions","organizations_url":"https://api.github.com/users/mikeswain/orgs","repos_url":"https://api.github.com/users/mikeswain/repos","events_url":"https://api.github.com/users/mikeswain/events{/privacy}","received_events_url":"https://api.github.com/users/mikeswain/received_events","type":"User","site_admin":false},"body":"Hi I noticed that in a lot of PHP generate markup  it inserts line feeds in HTML class attributes because people start a newline in the middle of strings to add a <?php ... ?> section. In your test against the class attributes using normalize-space to remove these should be the quickest way. Unit test included ...","created_at":"2016-02-07T04:00:11Z","updated_at":"2016-02-07T12:25:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f8f6d50d4ff0f60b8f2d4ec7c3d22b9b8077f14a","assignee":null,"milestone":{"url":"https://api.github.com/repos/jjriv/emogrifier/milestones/2","html_url":"https://github.com/jjriv/emogrifier/milestones/1.1.0","labels_url":"https://api.github.com/repos/jjriv/emogrifier/milestones/2/labels","id":1194397,"number":2,"title":"1.1.0","description":null,"creator":{"login":"oliverklee","id":765746,"avatar_url":"https://avatars.githubusercontent.com/u/765746?v=3","gravatar_id":"","url":"https://api.github.com/users/oliverklee","html_url":"https://github.com/oliverklee","followers_url":"https://api.github.com/users/oliverklee/followers","following_url":"https://api.github.com/users/oliverklee/following{/other_user}","gists_url":"https://api.github.com/users/oliverklee/gists{/gist_id}","starred_url":"https://api.github.com/users/oliverklee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliverklee/subscriptions","organizations_url":"https://api.github.com/users/oliverklee/orgs","repos_url":"https://api.github.com/users/oliverklee/repos","events_url":"https://api.github.com/users/oliverklee/events{/privacy}","received_events_url":"https://api.github.com/users/oliverklee/received_events","type":"User","site_admin":false},"open_issues":19,"closed_issues":38,"state":"open","created_at":"2015-07-06T08:58:04Z","updated_at":"2016-02-07T12:11:23Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/jjriv/emogrifier/pulls/298/commits","review_comments_url":"https://api.github.com/repos/jjriv/emogrifier/pulls/298/comments","review_comment_url":"https://api.github.com/repos/jjriv/emogrifier/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jjriv/emogrifier/issues/298/comments","statuses_url":"https://api.github.com/repos/jjriv/emogrifier/statuses/4574c576016125ed583d5322662684d9ecbbc1ab","head":{"label":"mikeswain:master","ref":"master","sha":"4574c576016125ed583d5322662684d9ecbbc1ab","user":{"login":"mikeswain","id":5952511,"avatar_url":"https://avatars.githubusercontent.com/u/5952511?v=3","gravatar_id":"","url":"https://api.github.com/users/mikeswain","html_url":"https://github.com/mikeswain","followers_url":"https://api.github.com/users/mikeswain/followers","following_url":"https://api.github.com/users/mikeswain/following{/other_user}","gists_url":"https://api.github.com/users/mikeswain/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeswain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeswain/subscriptions","organizations_url":"https://api.github.com/users/mikeswain/orgs","repos_url":"https://api.github.com/users/mikeswain/repos","events_url":"https://api.github.com/users/mikeswain/events{/privacy}","received_events_url":"https://api.github.com/users/mikeswain/received_events","type":"User","site_admin":false},"repo":{"id":51234308,"name":"emogrifier","full_name":"mikeswain/emogrifier","owner":{"login":"mikeswain","id":5952511,"avatar_url":"https://avatars.githubusercontent.com/u/5952511?v=3","gravatar_id":"","url":"https://api.github.com/users/mikeswain","html_url":"https://github.com/mikeswain","followers_url":"https://api.github.com/users/mikeswain/followers","following_url":"https://api.github.com/users/mikeswain/following{/other_user}","gists_url":"https://api.github.com/users/mikeswain/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeswain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeswain/subscriptions","organizations_url":"https://api.github.com/users/mikeswain/orgs","repos_url":"https://api.github.com/users/mikeswain/repos","events_url":"https://api.github.com/users/mikeswain/events{/privacy}","received_events_url":"https://api.github.com/users/mikeswain/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mikeswain/emogrifier","description":"Converts CSS styles into inline style attributes in your HTML code.","fork":true,"url":"https://api.github.com/repos/mikeswain/emogrifier","forks_url":"https://api.github.com/repos/mikeswain/emogrifier/forks","keys_url":"https://api.github.com/repos/mikeswain/emogrifier/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mikeswain/emogrifier/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mikeswain/emogrifier/teams","hooks_url":"https://api.github.com/repos/mikeswain/emogrifier/hooks","issue_events_url":"https://api.github.com/repos/mikeswain/emogrifier/issues/events{/number}","events_url":"https://api.github.com/repos/mikeswain/emogrifier/events","assignees_url":"https://api.github.com/repos/mikeswain/emogrifier/assignees{/user}","branches_url":"https://api.github.com/repos/mikeswain/emogrifier/branches{/branch}","tags_url":"https://api.github.com/repos/mikeswain/emogrifier/tags","blobs_url":"https://api.github.com/repos/mikeswain/emogrifier/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mikeswain/emogrifier/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mikeswain/emogrifier/git/refs{/sha}","trees_url":"https://api.github.com/repos/mikeswain/emogrifier/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mikeswain/emogrifier/statuses/{sha}","languages_url":"https://api.github.com/repos/mikeswain/emogrifier/languages","stargazers_url":"https://api.github.com/repos/mikeswain/emogrifier/stargazers","contributors_url":"https://api.github.com/repos/mikeswain/emogrifier/contributors","subscribers_url":"https://api.github.com/repos/mikeswain/emogrifier/subscribers","subscription_url":"https://api.github.com/repos/mikeswain/emogrifier/subscription","commits_url":"https://api.github.com/repos/mikeswain/emogrifier/commits{/sha}","git_commits_url":"https://api.github.com/repos/mikeswain/emogrifier/git/commits{/sha}","comments_url":"https://api.github.com/repos/mikeswain/emogrifier/comments{/number}","issue_comment_url":"https://api.github.com/repos/mikeswain/emogrifier/issues/comments{/number}","contents_url":"https://api.github.com/repos/mikeswain/emogrifier/contents/{+path}","compare_url":"https://api.github.com/repos/mikeswain/emogrifier/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mikeswain/emogrifier/merges","archive_url":"https://api.github.com/repos/mikeswain/emogrifier/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mikeswain/emogrifier/downloads","issues_url":"https://api.github.com/repos/mikeswain/emogrifier/issues{/number}","pulls_url":"https://api.github.com/repos/mikeswain/emogrifier/pulls{/number}","milestones_url":"https://api.github.com/repos/mikeswain/emogrifier/milestones{/number}","notifications_url":"https://api.github.com/repos/mikeswain/emogrifier/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mikeswain/emogrifier/labels{/name}","releases_url":"https://api.github.com/repos/mikeswain/emogrifier/releases{/id}","deployments_url":"https://api.github.com/repos/mikeswain/emogrifier/deployments","created_at":"2016-02-07T03:45:06Z","updated_at":"2016-02-07T03:45:07Z","pushed_at":"2016-02-07T03:56:29Z","git_url":"git://github.com/mikeswain/emogrifier.git","ssh_url":"git@github.com:mikeswain/emogrifier.git","clone_url":"https://github.com/mikeswain/emogrifier.git","svn_url":"https://github.com/mikeswain/emogrifier","homepage":null,"size":293,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"jjriv:master","ref":"master","sha":"7b00580315c80793e4cbfe0b1f689b311ceb46f9","user":{"login":"jjriv","id":4063419,"avatar_url":"https://avatars.githubusercontent.com/u/4063419?v=3","gravatar_id":"","url":"https://api.github.com/users/jjriv","html_url":"https://github.com/jjriv","followers_url":"https://api.github.com/users/jjriv/followers","following_url":"https://api.github.com/users/jjriv/following{/other_user}","gists_url":"https://api.github.com/users/jjriv/gists{/gist_id}","starred_url":"https://api.github.com/users/jjriv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjriv/subscriptions","organizations_url":"https://api.github.com/users/jjriv/orgs","repos_url":"https://api.github.com/users/jjriv/repos","events_url":"https://api.github.com/users/jjriv/events{/privacy}","received_events_url":"https://api.github.com/users/jjriv/received_events","type":"User","site_admin":false},"repo":{"id":14871640,"name":"emogrifier","full_name":"jjriv/emogrifier","owner":{"login":"jjriv","id":4063419,"avatar_url":"https://avatars.githubusercontent.com/u/4063419?v=3","gravatar_id":"","url":"https://api.github.com/users/jjriv","html_url":"https://github.com/jjriv","followers_url":"https://api.github.com/users/jjriv/followers","following_url":"https://api.github.com/users/jjriv/following{/other_user}","gists_url":"https://api.github.com/users/jjriv/gists{/gist_id}","starred_url":"https://api.github.com/users/jjriv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjriv/subscriptions","organizations_url":"https://api.github.com/users/jjriv/orgs","repos_url":"https://api.github.com/users/jjriv/repos","events_url":"https://api.github.com/users/jjriv/events{/privacy}","received_events_url":"https://api.github.com/users/jjriv/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jjriv/emogrifier","description":"Converts CSS styles into inline style attributes in your HTML code.","fork":false,"url":"https://api.github.com/repos/jjriv/emogrifier","forks_url":"https://api.github.com/repos/jjriv/emogrifier/forks","keys_url":"https://api.github.com/repos/jjriv/emogrifier/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jjriv/emogrifier/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jjriv/emogrifier/teams","hooks_url":"https://api.github.com/repos/jjriv/emogrifier/hooks","issue_events_url":"https://api.github.com/repos/jjriv/emogrifier/issues/events{/number}","events_url":"https://api.github.com/repos/jjriv/emogrifier/events","assignees_url":"https://api.github.com/repos/jjriv/emogrifier/assignees{/user}","branches_url":"https://api.github.com/repos/jjriv/emogrifier/branches{/branch}","tags_url":"https://api.github.com/repos/jjriv/emogrifier/tags","blobs_url":"https://api.github.com/repos/jjriv/emogrifier/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jjriv/emogrifier/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jjriv/emogrifier/git/refs{/sha}","trees_url":"https://api.github.com/repos/jjriv/emogrifier/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jjriv/emogrifier/statuses/{sha}","languages_url":"https://api.github.com/repos/jjriv/emogrifier/languages","stargazers_url":"https://api.github.com/repos/jjriv/emogrifier/stargazers","contributors_url":"https://api.github.com/repos/jjriv/emogrifier/contributors","subscribers_url":"https://api.github.com/repos/jjriv/emogrifier/subscribers","subscription_url":"https://api.github.com/repos/jjriv/emogrifier/subscription","commits_url":"https://api.github.com/repos/jjriv/emogrifier/commits{/sha}","git_commits_url":"https://api.github.com/repos/jjriv/emogrifier/git/commits{/sha}","comments_url":"https://api.github.com/repos/jjriv/emogrifier/comments{/number}","issue_comment_url":"https://api.github.com/repos/jjriv/emogrifier/issues/comments{/number}","contents_url":"https://api.github.com/repos/jjriv/emogrifier/contents/{+path}","compare_url":"https://api.github.com/repos/jjriv/emogrifier/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jjriv/emogrifier/merges","archive_url":"https://api.github.com/repos/jjriv/emogrifier/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jjriv/emogrifier/downloads","issues_url":"https://api.github.com/repos/jjriv/emogrifier/issues{/number}","pulls_url":"https://api.github.com/repos/jjriv/emogrifier/pulls{/number}","milestones_url":"https://api.github.com/repos/jjriv/emogrifier/milestones{/number}","notifications_url":"https://api.github.com/repos/jjriv/emogrifier/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jjriv/emogrifier/labels{/name}","releases_url":"https://api.github.com/repos/jjriv/emogrifier/releases{/id}","deployments_url":"https://api.github.com/repos/jjriv/emogrifier/deployments","created_at":"2013-12-02T18:58:48Z","updated_at":"2016-02-07T00:53:34Z","pushed_at":"2016-02-07T04:00:11Z","git_url":"git://github.com/jjriv/emogrifier.git","ssh_url":"git@github.com:jjriv/emogrifier.git","clone_url":"https://github.com/jjriv/emogrifier.git","svn_url":"https://github.com/jjriv/emogrifier","homepage":null,"size":626,"stargazers_count":250,"watchers_count":250,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":65,"mirror_url":null,"open_issues_count":32,"forks":65,"open_issues":32,"watchers":250,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jjriv/emogrifier/pulls/298"},"html":{"href":"https://github.com/jjriv/emogrifier/pull/298"},"issue":{"href":"https://api.github.com/repos/jjriv/emogrifier/issues/298"},"comments":{"href":"https://api.github.com/repos/jjriv/emogrifier/issues/298/comments"},"review_comments":{"href":"https://api.github.com/repos/jjriv/emogrifier/pulls/298/comments"},"review_comment":{"href":"https://api.github.com/repos/jjriv/emogrifier/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jjriv/emogrifier/pulls/298/commits"},"statuses":{"href":"https://api.github.com/repos/jjriv/emogrifier/statuses/4574c576016125ed583d5322662684d9ecbbc1ab"}}}}