[ php-blog-Bugs-1915339 ] Feed always sets email address even when told not to

"SourceForge.net" <[email protected]> Mon, 17 Mar 2008 04:39:03 -0700
Newsgroups gmane.comp.serendipity.trackers
Message-ID <[email protected]>
Bugs item #1915339, was opened at 2008-03-16 10:09
Message generated for change (Settings changed) made by garvinhicking
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=542822&aid=1915339&group_id=75065

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Syndication Feeds
Group: None
>Status: Pending
>Resolution: Fixed
>Priority: 1
Private: No
Submitted By: Filip Van Raemdonck (mechanix)
>Assigned to: Garvin Hicking (garvinhicking)
Summary: Feed always sets email address even when told not to

Initial Comment:
Even when the configuration says not to publish an email address, there still is an (invalid) address of [email protected] added to each entry of the ATOM feed, and I'd guess all feeds.

In include/functions_rss.inc.php there is a comment which says "// RSS Feeds need an E-Mail address!" (around line 85, in v1.2.1.
I checked the ATOM http://www.ietf.org/rfc/rfc4287.txt, RSS 2.0 http://www.rssboard.org/rss-specification#ltauthorgtSubelementOfLtitemgt,  RSS 1.0 http://web.resource.org/rss/1.0/spec and RSS 0.91 http://www.rssboard.org/rss-0-9-1-netscape specifications and nowhere is email listed as a required field.
In case of ATOM, email is an optional subelement of author.
In case of RSS 2.0, it's actually the author field that should be an email address, but there it is listed as optional too.
RSS 1.0 and RSS 0.91 are completely silent about either an email or author element -- no requirement there either.

For the time being I fixed this by making sure in the above include file that entry['no_email'] is always set to either TRUE or FALSE, and adding an if check around the email element in the ATOM smarty template.

This should really be fixed in the serendipity distribtuion as well, though.

----------------------------------------------------------------------

>Comment By: Garvin Hicking (garvinhicking)
Date: 2008-03-17 11:39

Message:
Logged In: YES 
user_id=473563
Originator: NO

Hi!

Thanks for looking into this. The RSS2.0 problem was more that the
<author> element is described at needing to be in the format "mail
(realname)", so we could not simply issue "realname" inside the author
element. The element itself is optional, but we emit the authorname there.
If you do not like that yourself, you can edit the feed*.tpl template files
for your template.

For Atom, this is a different matter -- there, basically you could remove
the email on its own. The problem is that our generation code at this point
does not differ between RSS or ATOM output, this is decided in the
feed*.tpl files on its own. This is where you could also strip the <email>
part, like you've seem to already have done. I have now applied this to the
two atom (1.0 and 0.3) template files in the s9y default distribution as
well.


Best regards,
Garvin

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=542822&aid=1915339&group_id=75065

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/