{"action":"created","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/7976","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/7976/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/7976/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/7976/events","html_url":"https://github.com/cakephp/cakephp/issues/7976","id":125204930,"number":7976,"title":"TextHelper autoLink is including newlines in href","user":{"login":"fullybaked","id":527122,"avatar_url":"https://avatars.githubusercontent.com/u/527122?v=3","gravatar_id":"","url":"https://api.github.com/users/fullybaked","html_url":"https://github.com/fullybaked","followers_url":"https://api.github.com/users/fullybaked/followers","following_url":"https://api.github.com/users/fullybaked/following{/other_user}","gists_url":"https://api.github.com/users/fullybaked/gists{/gist_id}","starred_url":"https://api.github.com/users/fullybaked/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fullybaked/subscriptions","organizations_url":"https://api.github.com/users/fullybaked/orgs","repos_url":"https://api.github.com/users/fullybaked/repos","events_url":"https://api.github.com/users/fullybaked/events{/privacy}","received_events_url":"https://api.github.com/users/fullybaked/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cakephp/cakephp/labels/Defect","name":"Defect","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/71","html_url":"https://github.com/cakephp/cakephp/milestones/3.1.7","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/71/labels","id":1472762,"number":71,"title":"3.1.7","description":"Bugfixes and minor features for CakePHP 3.1.x","creator":{"login":"markstory","id":24086,"avatar_url":"https://avatars.githubusercontent.com/u/24086?v=3","gravatar_id":"","url":"https://api.github.com/users/markstory","html_url":"https://github.com/markstory","followers_url":"https://api.github.com/users/markstory/followers","following_url":"https://api.github.com/users/markstory/following{/other_user}","gists_url":"https://api.github.com/users/markstory/gists{/gist_id}","starred_url":"https://api.github.com/users/markstory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markstory/subscriptions","organizations_url":"https://api.github.com/users/markstory/orgs","repos_url":"https://api.github.com/users/markstory/repos","events_url":"https://api.github.com/users/markstory/events{/privacy}","received_events_url":"https://api.github.com/users/markstory/received_events","type":"User","site_admin":false},"open_issues":31,"closed_issues":44,"state":"open","created_at":"2015-12-23T16:13:37Z","updated_at":"2016-01-07T02:46:19Z","due_on":"2016-01-17T05:00:00Z","closed_at":null},"comments":2,"created_at":"2016-01-06T15:59:11Z","updated_at":"2016-01-07T02:53:26Z","closed_at":null,"body":"We're using the following code to output some content that is stored in plaintext\r\n\r\n```\r\n<?= $this->Text->autoParagraph($this->Text->autoLink($project->summary));?>\r\n```\r\n\r\nThis is causing links in the summary to render as \r\n\r\n```\r\n<a href=\"http://www.example.com</br>\">www.example.com</a>\r\n<a href=\"http://www.example.com</br>\">www.example.com</a>\r\n```\r\n\r\nif the plaintext stored is\r\n\r\n```\r\nwww.example.com\r\nwww.example.com\r\n```\r\n\r\nI wonder if the `$url` here https://github.com/cakephp/cakephp/blob/master/src/View/Helper/TextHelper.php#L167 needs a trim to ensure no whitespace creeps in (it's not valid anyway).\r\n\r\nI don't mind putting in a PR, it would only take a second, but would like opinion first.  NB, the email equivalent probably needs this too, but it's not part of my use case so I haven't checked."},"comment":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/comments/169532945","html_url":"https://github.com/cakephp/cakephp/issues/7976#issuecomment-169532945","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/7976","id":169532945,"user":{"login":"markstory","id":24086,"avatar_url":"https://avatars.githubusercontent.com/u/24086?v=3","gravatar_id":"","url":"https://api.github.com/users/markstory","html_url":"https://github.com/markstory","followers_url":"https://api.github.com/users/markstory/followers","following_url":"https://api.github.com/users/markstory/following{/other_user}","gists_url":"https://api.github.com/users/markstory/gists{/gist_id}","starred_url":"https://api.github.com/users/markstory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markstory/subscriptions","organizations_url":"https://api.github.com/users/markstory/orgs","repos_url":"https://api.github.com/users/markstory/repos","events_url":"https://api.github.com/users/markstory/events{/privacy}","received_events_url":"https://api.github.com/users/markstory/received_events","type":"User","site_admin":false},"created_at":"2016-01-07T02:53:26Z","updated_at":"2016-01-07T02:53:26Z","body":"A pull request would be great. The current output is very wrong :smile:"}}