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

RSS author tag for each post should contain only email #41

Closed
scottnonnenberg opened this issue May 18, 2016 · 3 comments
Closed

RSS author tag for each post should contain only email #41

scottnonnenberg opened this issue May 18, 2016 · 3 comments

Comments

@scottnonnenberg
Copy link

Many thanks for this module. Really made things easy for me. :0)

But I am running into a validation problem: https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Fblog.scottnonnenberg.com%2Frss.xml

The <author> tag is specified with three child tags, and the validator expects just a string, the author's email:

line 119, column 16: Undefined author element: name (20 occurrences) [help]
                <name>Scott Nonnenberg</name>
                ^
line 120, column 16: Undefined author element: email (20 occurrences) [help]
                <email>scott@nonnenberg.com</email>
                ^
line 121, column 16: Undefined author element: link (20 occurrences) [help]
                <link>https://scottnonnenberg.com</link>
                ^
line 122, column 12: Invalid email address: (20 occurrences) [help]
            </author>
            ^

Atom doesn't have the same problem: https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Fblog.scottnonnenberg.com%2Fatom.xml

Maybe for the RSS feed only, we could take the email key from the provided author object and promote it? I'd be happy to submit a pull request.

@seriousManual
Copy link

ran into that issue today as well, how did you fix it?
maybe by choosing another module for feed generation?

@scottnonnenberg
Copy link
Author

Just left it, since it seems this bug wasn't important enough. It would be a small change here:

if(items[i].author) {

Interesting that the link in the code shows this as the proper format for <author>:

<author> sub-element of <item>

<author> is an optional sub-element of <item>.

It's the email address of the author of the item. For newspapers and magazines syndicating via RSS, the author is the person who wrote the article that the <item> describes. For collaborative weblogs, the author of the item might be different from the managing editor or webmaster. For a weblog authored by a single individual it would make sense to omit the <author> element.

<author>lawyer@boyer.net (Lawyer Boyer)</author>

jpmonette added a commit that referenced this issue Mar 31, 2017
Resolves #41 - Fix “author” tag based on W3 Validator
@seriousManual
Copy link

thx

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

No branches or pull requests

2 participants