1.1 --- a/EventAggregatorSupport/Formatting.py Fri Jun 14 00:40:23 2013 +0200
1.2 +++ b/EventAggregatorSupport/Formatting.py Fri Jun 14 17:24:37 2013 +0200
1.3 @@ -110,14 +110,14 @@
1.4
1.5 path_info = getPathInfo(request)
1.6
1.7 - write('<rss version="2.0">\r\n')
1.8 - write('<channel>\r\n')
1.9 - write('<title>%s</title>\r\n' % path_info[1:])
1.10 - write('<link>%s%s</link>\r\n' % (request.getBaseURL(), path_info))
1.11 - write('<description>Events published on %s%s</description>\r\n' % (request.getBaseURL(), path_info))
1.12 + write('<rss version="2.0">\n')
1.13 + write('<channel>\n')
1.14 + write('<title>%s</title>\n' % path_info[1:])
1.15 + write('<link>%s%s</link>\n' % (request.getBaseURL(), path_info))
1.16 + write('<description>Events published on %s%s</description>\n' % (request.getBaseURL(), path_info))
1.17
1.18 if latest_timestamp is not None:
1.19 - write('<lastBuildDate>%s</lastBuildDate>\r\n' % latest_timestamp.as_HTTP_datetime_string())
1.20 + write('<lastBuildDate>%s</lastBuildDate>\n' % latest_timestamp.as_HTTP_datetime_string())
1.21
1.22 # Sort the events by start date, reversed.
1.23
1.24 @@ -140,8 +140,8 @@
1.25 _write("END", {}, "VCALENDAR")
1.26
1.27 elif mimetype == "application/rss+xml":
1.28 - write('</channel>\r\n')
1.29 - write('</rss>\r\n')
1.30 + write('</channel>\n')
1.31 + write('</rss>\n')
1.32
1.33 elif mimetype == "text/html":
1.34 write('</body>')
1.35 @@ -229,9 +229,9 @@
1.36 event_summary = event.getSummary(parent)
1.37 link = event.getEventURL()
1.38
1.39 - write('<item>\r\n')
1.40 - write('<title>%s</title>\r\n' % escape(event_summary))
1.41 - write('<link>%s</link>\r\n' % link)
1.42 + write('<item>\n')
1.43 + write('<title>%s</title>\n' % escape(event_summary))
1.44 + write('<link>%s</link>\n' % link)
1.45
1.46 # Write a description according to the preferred source of
1.47 # descriptions.
1.48 @@ -241,16 +241,16 @@
1.49 else:
1.50 description = event_metadata["last-comment"]
1.51
1.52 - write('<description>%s</description>\r\n' %
1.53 + write('<description>%s</description>\n' %
1.54 fmt.text(event_page.formatText(description, fmt)))
1.55
1.56 for topic in event_details.get("topics") or event_details.get("categories") or []:
1.57 - write('<category>%s</category>\r\n' %
1.58 + write('<category>%s</category>\n' %
1.59 fmt.text(event_page.formatText(topic, fmt)))
1.60
1.61 - write('<pubDate>%s</pubDate>\r\n' % event_metadata["created"].as_HTTP_datetime_string())
1.62 - write('<guid>%s#%s</guid>\r\n' % (link, event_metadata["sequence"]))
1.63 - write('</item>\r\n')
1.64 + write('<pubDate>%s</pubDate>\n' % event_metadata["created"].as_HTTP_datetime_string())
1.65 + write('<guid>%s#%s</guid>\n' % (link, event_metadata["sequence"]))
1.66 + write('</item>\n')
1.67
1.68 elif mimetype == "text/html":
1.69 fmt = request.html_formatter