1.1 --- a/EventAggregatorSupport/Types.py Wed Jan 29 19:21:20 2014 +0100
1.2 +++ b/EventAggregatorSupport/Types.py Sat Feb 15 16:46:49 2014 +0100
1.3 @@ -140,8 +140,10 @@
1.4 by the given 'url' and 'metadata'.
1.5 """
1.6
1.7 + new_url = "" # hide the IMAP URL
1.8 +
1.9 message = Parser().parse(f)
1.10 - resources = EventResourceCollection(url or "", metadata or {})
1.11 + resources = EventResourceCollection(new_url, metadata or {})
1.12
1.13 for data in message.get_payload():
1.14
1.15 @@ -156,7 +158,7 @@
1.16
1.17 # Obtain a calendar and merge it into the collection.
1.18
1.19 - resources.append(parseEventsInXMLCalendarFromResource(StringIO(text.get_payload(decode=True))))
1.20 + resources.append(parseEventsInXMLCalendarFromResource(StringIO(text.get_payload(decode=True)), part.get_charset(), new_url))
1.21
1.22 return resources
1.23
1.24 @@ -974,6 +976,8 @@
1.25 the absence of any URL in the event details.
1.26 """
1.27
1.28 + # NOTE: Redirect empty URLs to an action showing the resource details.
1.29 +
1.30 return self.details.get("url") and \
1.31 self.valueToString(self.details["url"]) or \
1.32 self.page.getPageURL()