Ticket #4704 (closed defect (bug): fixed)

Opened 5 years ago

Last modified 4 years ago

Invalid RSS2 Comments Feed

Reported by: lexhair Owned by: anonymous
Priority: high Milestone: 2.2.3
Component: Administration Version: 2.2.1
Severity: normal Keywords: has-patch
Cc:

Description

Version 2.2.2. My comments RSS2 feed was invalid because the author tags did not enclose a valid email address.

I modified the feed-rss2-comments.php file to include xlmns:dc="http://purl.org/dc/elements/1.1/" in the head space and changed the author tags to dc:creator tags. This validated the comments feed.

I apologize for not submitting the patch as a diff but I'm quite a noob when it comes to this stuff.

Attachments

rss2comments-patch.zip Download (1.3 KB) - added by lexhair 5 years ago.
Patched feed-rss2-comments.php file for feed validation
4704-222.diff Download (1018 bytes) - added by Otto42 5 years ago.
dc:creator patch for 2.2.2
4704-trunk.diff Download (1018 bytes) - added by Otto42 5 years ago.
dc:creator patch for trunk

Change History

  • Keywords has-patch added
  • Priority changed from normal to high
  • Version set to 2.2.1
  • Milestone set to 2.3 (trunk)

Agreed, this causes all comment feeds to be invalid. The author element is supposed to conform to RFC822.

 http://cyber.law.harvard.edu/rss/rss.html#ltauthorgtSubelementOfLtitemgt  http://feedvalidator.org/docs/error/InvalidContact.html

I'm attaching a patch to fix this for 2.2.2. Trunk patch coming soon.

Ahh.. It just occurred to me that it might not be desirable to publish email addresses of comment authors, considering it says that you won't on the default theme page. So... forget the above patch, perhaps the dc:creator would indeed be a better way to go.

Yeah, publishing e-mails = major eww and should be avoided at all costs.

I'll attach my patched feed-rss2-comments.php so if someone wants to make a diff out of it, go for it.

lexhair5 years ago

Patched feed-rss2-comments.php file for feed validation

Otto425 years ago

dc:creator patch for 2.2.2

Otto425 years ago

dc:creator patch for trunk

Added dc:creator based patches for 2.2.2 and trunk. These change the author to dc:creator, which eliminates the validation issue.

comment:6   ryan4 years ago

  • Status changed from new to closed
  • Resolution set to fixed

(In [5881]) Use dc:creator instead of author for rss2 comment feeds. Props lexhair, Otto42. fixes #4704 for 2.3

comment:7   ryan4 years ago

(In [5882]) Use dc:creator instead of author for rss2 comment feeds. Props lexhair, Otto42. fixes #4704 for 2.2

comment:8   ryan4 years ago

  • Milestone changed from 2.3 (trunk) to 2.2.3
Note: See TracTickets for help on using tickets.