Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feed parsing: use author email when there's no author name #1801

Merged
merged 1 commit into from
Feb 28, 2018

Conversation

perrinjerome
Copy link
Contributor

This is especially useful because when author is given as
<author>Author Name</author> ( as in this example
https://cyber.harvard.edu/rss/rss.html#ltauthorgtSubelementOfLtitemgt ),
SimplePie will expose Author Name as email.

@perrinjerome
Copy link
Contributor Author

A random feed where authors were not parsed properly: https://devnet.kentico.com/rss/articles

I could not find which test could be extended to cover this, so I did not write any new test.

@@ -355,7 +355,7 @@ public function loadEntries($feed) {
$this->id(),
$item->get_id(false, false),
$title === null ? '' : $title,
$author === null ? '' : html_only_entity_decode(strip_tags($author->name)),
$author === null ? '' : html_only_entity_decode(strip_tags($author->name === null ? $author->email : $author->name)),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest == '' instead of === null to catch other nullish values such as empty strings

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I pushed-force with a fix for that

@Alkarex Alkarex added this to the 1.10.1 milestone Feb 28, 2018
@Alkarex
Copy link
Member

Alkarex commented Feb 28, 2018

Thanks! 👍

This is especially useful because when author is given as
`<author>Author Name</author>` ( as in this example
https://cyber.harvard.edu/rss/rss.html#ltauthorgtSubelementOfLtitemgt ),
SimplePie will expose *Author Name* as `email`.
@Alkarex Alkarex merged commit 0c066cb into FreshRSS:dev Feb 28, 2018
Alkarex added a commit that referenced this pull request Mar 1, 2018
@Alkarex Alkarex mentioned this pull request Mar 3, 2018
javerous pushed a commit to javerous/FreshRSS that referenced this pull request Jan 20, 2020
…1801)

This is especially useful because when author is given as
`<author>Author Name</author>` ( as in this example
https://cyber.harvard.edu/rss/rss.html#ltauthorgtSubelementOfLtitemgt ),
SimplePie will expose *Author Name* as `email`.
mdemoss pushed a commit to mdemoss/FreshRSS that referenced this pull request Mar 25, 2021
…1801)

This is especially useful because when author is given as
`<author>Author Name</author>` ( as in this example
https://cyber.harvard.edu/rss/rss.html#ltauthorgtSubelementOfLtitemgt ),
SimplePie will expose *Author Name* as `email`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants