{"action":"created","issue":{"url":"https://api.github.com/repos/feedjira/feedjira/issues/350","repository_url":"https://api.github.com/repos/feedjira/feedjira","labels_url":"https://api.github.com/repos/feedjira/feedjira/issues/350/labels{/name}","comments_url":"https://api.github.com/repos/feedjira/feedjira/issues/350/comments","events_url":"https://api.github.com/repos/feedjira/feedjira/issues/350/events","html_url":"https://github.com/feedjira/feedjira/issues/350","id":194858494,"number":350,"title":"Strip whitespace inside elements","user":{"login":"sferik","id":10308,"avatar_url":"https://avatars.githubusercontent.com/u/10308?v=3","gravatar_id":"","url":"https://api.github.com/users/sferik","html_url":"https://github.com/sferik","followers_url":"https://api.github.com/users/sferik/followers","following_url":"https://api.github.com/users/sferik/following{/other_user}","gists_url":"https://api.github.com/users/sferik/gists{/gist_id}","starred_url":"https://api.github.com/users/sferik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sferik/subscriptions","organizations_url":"https://api.github.com/users/sferik/orgs","repos_url":"https://api.github.com/users/sferik/repos","events_url":"https://api.github.com/users/sferik/events{/privacy}","received_events_url":"https://api.github.com/users/sferik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-11T21:38:40Z","updated_at":"2016-12-13T04:09:43Z","closed_at":null,"body":"I noticed that many RSS feeds have extra whitespace (newlines, carriage returns, tabs, and spaces) within elements.\r\n\r\nFor example:\r\n\r\n```xml\r\n<title>\r\n\r\n        All About Everything  \r\n\r\n</title>\r\n```\r\n\r\nFeedjira will parse this into a Ruby string that is surrounded by whitespace:\r\n\r\n```ruby\r\n\"\\n\\n        All About Everything\\n\\n\"\r\n```\r\n\r\nTo get around this issue, I’ve written Ruby code that looks like this:\r\n\r\n```ruby\r\nself.title = feed.title&.strip\r\nself.author = feed.itunes_author&.strip\r\nself.image = feed.itunes_image&.strip\r\nself.subtitle = feed.itunes_subtitle&.strip\r\nself.summary = feed.itunes_summary&.strip\r\nself.description = feed.description&.strip\r\nself.language = feed.language&.downcase&.strip\r\nself.keywords = feed.itunes_keywords&.strip\r\n```\r\n\r\nIdeally, all of that stripping would be done in this library, so my code could look more like this:\r\n\r\n```ruby\r\nself.title = feed.title\r\nself.author = feed.itunes_author\r\nself.image = feed.itunes_image\r\nself.subtitle = feed.itunes_subtitle\r\nself.summary = feed.itunes_summary\r\nself.description = feed.description\r\nself.language = feed.language&.downcase\r\nself.keywords = feed.itunes_keywords\r\n```\r\n\r\nWould this change be appropriate for the [2.1 milestone](https://github.com/feedjira/feedjira/milestone/1)?\r\n\r\nIf so, I can start working on this today."},"comment":{"url":"https://api.github.com/repos/feedjira/feedjira/issues/comments/266635703","html_url":"https://github.com/feedjira/feedjira/issues/350#issuecomment-266635703","issue_url":"https://api.github.com/repos/feedjira/feedjira/issues/350","id":266635703,"user":{"login":"HParker","id":4482399,"avatar_url":"https://avatars.githubusercontent.com/u/4482399?v=3","gravatar_id":"","url":"https://api.github.com/users/HParker","html_url":"https://github.com/HParker","followers_url":"https://api.github.com/users/HParker/followers","following_url":"https://api.github.com/users/HParker/following{/other_user}","gists_url":"https://api.github.com/users/HParker/gists{/gist_id}","starred_url":"https://api.github.com/users/HParker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HParker/subscriptions","organizations_url":"https://api.github.com/users/HParker/orgs","repos_url":"https://api.github.com/users/HParker/repos","events_url":"https://api.github.com/users/HParker/events{/privacy}","received_events_url":"https://api.github.com/users/HParker/received_events","type":"User","site_admin":false},"created_at":"2016-12-13T04:09:43Z","updated_at":"2016-12-13T04:09:43Z","body":"I feel fairly confident that we should be able to remove whitespace from fields like links.\r\n\r\nRight now I think the best plan of action would be to introduce it behind a config option in 2.1.1 and look at making it standard in a future major version.\r\n\r\nHow does that sound?"}}
{"actor":{"display_login":"HParker"}}