[CalendarServer-changes] [7904] CalendarServer/branches/users/glyph/imip-and-admin-html/ twistedcaldav/mail.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu Aug 11 21:40:52 PDT 2011
Revision: 7904
http://trac.macosforge.org/projects/calendarserver/changeset/7904
Author: glyph at apple.com
Date: 2011-08-11 21:40:52 -0700 (Thu, 11 Aug 2011)
Log Message:
-----------
add attendees as tags, not (quoted) text
Modified Paths:
--------------
CalendarServer/branches/users/glyph/imip-and-admin-html/twistedcaldav/mail.py
Modified: CalendarServer/branches/users/glyph/imip-and-admin-html/twistedcaldav/mail.py
===================================================================
--- CalendarServer/branches/users/glyph/imip-and-admin-html/twistedcaldav/mail.py 2011-08-12 04:40:41 UTC (rev 7903)
+++ CalendarServer/branches/users/glyph/imip-and-admin-html/twistedcaldav/mail.py 2011-08-12 04:40:52 UTC (rev 7904)
@@ -44,7 +44,7 @@
from twisted.web import client
from twisted.web.template import (
- XMLString, TEMPLATE_NAMESPACE, Element, renderer, flattenString
+ XMLString, TEMPLATE_NAMESPACE, Element, renderer, flattenString, tags
)
from twisted.web.microdom import parseString
from twisted.web.microdom import Text as DOMText, Element as DOMElement
@@ -1433,12 +1433,15 @@
htmlAttendees = []
for cn, mailto in attendees:
if mailto:
- htmlAttendees.append('<a href="mailto:%s">%s</a>' %
- (mailto, cn))
+ if not cn:
+ cn = mailto
+ htmlAttendees.append(
+ tags.a(href="mailto:%s" % (mailto,))(cn)
+ )
else:
htmlAttendees.append(cn)
- details['htmlAttendees'] = ", ".join(htmlAttendees)
+ details['htmlAttendees'] = htmlAttendees
# TODO: htmlOrganizer is also some HTML that requires additional
# template stuff, and once again, it's just a 'mailto:'.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110811/c79508d5/attachment-0001.html>
More information about the calendarserver-changes
mailing list