{"action":"opened","number":363,"pull_request":{"url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/pulls/363","id":68222264,"html_url":"https://github.com/wordpress-mobile/WordPress-Editor-Android/pull/363","diff_url":"https://github.com/wordpress-mobile/WordPress-Editor-Android/pull/363.diff","patch_url":"https://github.com/wordpress-mobile/WordPress-Editor-Android/pull/363.patch","issue_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/issues/363","number":363,"state":"open","locked":false,"title":"Issue #345: Buggy links inside blockquotes","user":{"login":"aforcier","id":9613966,"avatar_url":"https://avatars.githubusercontent.com/u/9613966?v=3","gravatar_id":"","url":"https://api.github.com/users/aforcier","html_url":"https://github.com/aforcier","followers_url":"https://api.github.com/users/aforcier/followers","following_url":"https://api.github.com/users/aforcier/following{/other_user}","gists_url":"https://api.github.com/users/aforcier/gists{/gist_id}","starred_url":"https://api.github.com/users/aforcier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aforcier/subscriptions","organizations_url":"https://api.github.com/users/aforcier/orgs","repos_url":"https://api.github.com/users/aforcier/repos","events_url":"https://api.github.com/users/aforcier/events{/privacy}","received_events_url":"https://api.github.com/users/aforcier/received_events","type":"User","site_admin":false},"body":"Fixes #345. The cause was weird WebView behavior when calling `execCommand('insertHTML')` to insert the link tag: instead of being inserted within the current `div`, it was added outside of it.\r\n\r\nSo instead of:\r\n\r\n```HTML\r\n<blockquote>\r\n  <div>text <a href=\"http://example\">link</a></div>\r\n</blockquote>\r\n```\r\n\r\nwe had:\r\n\r\n```HTML\r\n<blockquote>\r\n  <div>text </div>\r\n  <a href=\"http://example\">link</a>\r\n</blockquote>\r\n```\r\n\r\nThis also caused autocorrect issues, as usually happens when adding text anywhere but inside a `div`.\r\n\r\nThe fix was to wrap links in `div` tags inside blockquotes, but I had to exclude a few cases: empty newline inside blockquote, and inserting a link in the middle of a line (with text surrounding on both sides). Those were cases where the `div` wrapping is unnecessary, and causes other issues if used (double-wrapping in `div`s, or toggling `div` off on the entire line).\r\n\r\ncc @maxme ","created_at":"2016-04-28T13:42:36Z","updated_at":"2016-04-28T13:42:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"maxme","id":40213,"avatar_url":"https://avatars.githubusercontent.com/u/40213?v=3","gravatar_id":"","url":"https://api.github.com/users/maxme","html_url":"https://github.com/maxme","followers_url":"https://api.github.com/users/maxme/followers","following_url":"https://api.github.com/users/maxme/following{/other_user}","gists_url":"https://api.github.com/users/maxme/gists{/gist_id}","starred_url":"https://api.github.com/users/maxme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxme/subscriptions","organizations_url":"https://api.github.com/users/maxme/orgs","repos_url":"https://api.github.com/users/maxme/repos","events_url":"https://api.github.com/users/maxme/events{/privacy}","received_events_url":"https://api.github.com/users/maxme/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/milestones/9","html_url":"https://github.com/wordpress-mobile/WordPress-Editor-Android/milestones/1.0","labels_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/milestones/9/labels","id":1600578,"number":9,"title":"1.0","description":"First public release","creator":{"login":"maxme","id":40213,"avatar_url":"https://avatars.githubusercontent.com/u/40213?v=3","gravatar_id":"","url":"https://api.github.com/users/maxme","html_url":"https://github.com/maxme","followers_url":"https://api.github.com/users/maxme/followers","following_url":"https://api.github.com/users/maxme/following{/other_user}","gists_url":"https://api.github.com/users/maxme/gists{/gist_id}","starred_url":"https://api.github.com/users/maxme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxme/subscriptions","organizations_url":"https://api.github.com/users/maxme/orgs","repos_url":"https://api.github.com/users/maxme/repos","events_url":"https://api.github.com/users/maxme/events{/privacy}","received_events_url":"https://api.github.com/users/maxme/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":23,"state":"open","created_at":"2016-02-23T17:15:33Z","updated_at":"2016-04-28T13:42:37Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/pulls/363/commits","review_comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/pulls/363/comments","review_comment_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/issues/363/comments","statuses_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/statuses/0a14286b0d95b8ea3d6f418a68a0b560c2511f1b","head":{"label":"wordpress-mobile:issue/345-blockquote-links","ref":"issue/345-blockquote-links","sha":"0a14286b0d95b8ea3d6f418a68a0b560c2511f1b","user":{"login":"wordpress-mobile","id":1306301,"avatar_url":"https://avatars.githubusercontent.com/u/1306301?v=3","gravatar_id":"","url":"https://api.github.com/users/wordpress-mobile","html_url":"https://github.com/wordpress-mobile","followers_url":"https://api.github.com/users/wordpress-mobile/followers","following_url":"https://api.github.com/users/wordpress-mobile/following{/other_user}","gists_url":"https://api.github.com/users/wordpress-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/wordpress-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordpress-mobile/subscriptions","organizations_url":"https://api.github.com/users/wordpress-mobile/orgs","repos_url":"https://api.github.com/users/wordpress-mobile/repos","events_url":"https://api.github.com/users/wordpress-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/wordpress-mobile/received_events","type":"Organization","site_admin":false},"repo":{"id":30292255,"name":"WordPress-Editor-Android","full_name":"wordpress-mobile/WordPress-Editor-Android","owner":{"login":"wordpress-mobile","id":1306301,"avatar_url":"https://avatars.githubusercontent.com/u/1306301?v=3","gravatar_id":"","url":"https://api.github.com/users/wordpress-mobile","html_url":"https://github.com/wordpress-mobile","followers_url":"https://api.github.com/users/wordpress-mobile/followers","following_url":"https://api.github.com/users/wordpress-mobile/following{/other_user}","gists_url":"https://api.github.com/users/wordpress-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/wordpress-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordpress-mobile/subscriptions","organizations_url":"https://api.github.com/users/wordpress-mobile/orgs","repos_url":"https://api.github.com/users/wordpress-mobile/repos","events_url":"https://api.github.com/users/wordpress-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/wordpress-mobile/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wordpress-mobile/WordPress-Editor-Android","description":"A reusable Android rich text editor component.","fork":false,"url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android","forks_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/forks","keys_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/teams","hooks_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/hooks","issue_events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/issues/events{/number}","events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/events","assignees_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/assignees{/user}","branches_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/branches{/branch}","tags_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/tags","blobs_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/git/refs{/sha}","trees_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/statuses/{sha}","languages_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/languages","stargazers_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/stargazers","contributors_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/contributors","subscribers_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/subscribers","subscription_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/subscription","commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/commits{/sha}","git_commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/git/commits{/sha}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/comments{/number}","issue_comment_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/issues/comments{/number}","contents_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/contents/{+path}","compare_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/merges","archive_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/downloads","issues_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/issues{/number}","pulls_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/pulls{/number}","milestones_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/milestones{/number}","notifications_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/labels{/name}","releases_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/releases{/id}","deployments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/deployments","created_at":"2015-02-04T09:54:16Z","updated_at":"2016-04-27T17:23:07Z","pushed_at":"2016-04-28T13:07:49Z","git_url":"git://github.com/wordpress-mobile/WordPress-Editor-Android.git","ssh_url":"git@github.com:wordpress-mobile/WordPress-Editor-Android.git","clone_url":"https://github.com/wordpress-mobile/WordPress-Editor-Android.git","svn_url":"https://github.com/wordpress-mobile/WordPress-Editor-Android","homepage":"","size":2913,"stargazers_count":59,"watchers_count":59,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":82,"forks":17,"open_issues":82,"watchers":59,"default_branch":"develop"}},"base":{"label":"wordpress-mobile:develop","ref":"develop","sha":"6abc921614c059491e4abf71fb4cb6cd8948387c","user":{"login":"wordpress-mobile","id":1306301,"avatar_url":"https://avatars.githubusercontent.com/u/1306301?v=3","gravatar_id":"","url":"https://api.github.com/users/wordpress-mobile","html_url":"https://github.com/wordpress-mobile","followers_url":"https://api.github.com/users/wordpress-mobile/followers","following_url":"https://api.github.com/users/wordpress-mobile/following{/other_user}","gists_url":"https://api.github.com/users/wordpress-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/wordpress-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordpress-mobile/subscriptions","organizations_url":"https://api.github.com/users/wordpress-mobile/orgs","repos_url":"https://api.github.com/users/wordpress-mobile/repos","events_url":"https://api.github.com/users/wordpress-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/wordpress-mobile/received_events","type":"Organization","site_admin":false},"repo":{"id":30292255,"name":"WordPress-Editor-Android","full_name":"wordpress-mobile/WordPress-Editor-Android","owner":{"login":"wordpress-mobile","id":1306301,"avatar_url":"https://avatars.githubusercontent.com/u/1306301?v=3","gravatar_id":"","url":"https://api.github.com/users/wordpress-mobile","html_url":"https://github.com/wordpress-mobile","followers_url":"https://api.github.com/users/wordpress-mobile/followers","following_url":"https://api.github.com/users/wordpress-mobile/following{/other_user}","gists_url":"https://api.github.com/users/wordpress-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/wordpress-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordpress-mobile/subscriptions","organizations_url":"https://api.github.com/users/wordpress-mobile/orgs","repos_url":"https://api.github.com/users/wordpress-mobile/repos","events_url":"https://api.github.com/users/wordpress-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/wordpress-mobile/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wordpress-mobile/WordPress-Editor-Android","description":"A reusable Android rich text editor component.","fork":false,"url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android","forks_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/forks","keys_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/teams","hooks_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/hooks","issue_events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/issues/events{/number}","events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/events","assignees_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/assignees{/user}","branches_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/branches{/branch}","tags_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/tags","blobs_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/git/refs{/sha}","trees_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/statuses/{sha}","languages_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/languages","stargazers_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/stargazers","contributors_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/contributors","subscribers_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/subscribers","subscription_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/subscription","commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/commits{/sha}","git_commits_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/git/commits{/sha}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/comments{/number}","issue_comment_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/issues/comments{/number}","contents_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/contents/{+path}","compare_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/merges","archive_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/downloads","issues_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/issues{/number}","pulls_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/pulls{/number}","milestones_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/milestones{/number}","notifications_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/labels{/name}","releases_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/releases{/id}","deployments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/deployments","created_at":"2015-02-04T09:54:16Z","updated_at":"2016-04-27T17:23:07Z","pushed_at":"2016-04-28T13:07:49Z","git_url":"git://github.com/wordpress-mobile/WordPress-Editor-Android.git","ssh_url":"git@github.com:wordpress-mobile/WordPress-Editor-Android.git","clone_url":"https://github.com/wordpress-mobile/WordPress-Editor-Android.git","svn_url":"https://github.com/wordpress-mobile/WordPress-Editor-Android","homepage":"","size":2913,"stargazers_count":59,"watchers_count":59,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":82,"forks":17,"open_issues":82,"watchers":59,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/pulls/363"},"html":{"href":"https://github.com/wordpress-mobile/WordPress-Editor-Android/pull/363"},"issue":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/issues/363"},"comments":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/issues/363/comments"},"review_comments":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/pulls/363/comments"},"review_comment":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/pulls/363/commits"},"statuses":{"href":"https://api.github.com/repos/wordpress-mobile/WordPress-Editor-Android/statuses/0a14286b0d95b8ea3d6f418a68a0b560c2511f1b"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":29,"deletions":3,"changed_files":2}}