Get tests to pass again.

Re-add old gmail_notify plugin for now.
This commit is contained in:
Lance Stout
2013-01-26 15:10:06 -08:00
parent 639a3aa832
commit 23f112602c
6 changed files with 168 additions and 17 deletions

View File

@@ -26,13 +26,20 @@ class XHTML_IM(ElementBase):
if lang is None:
lang = self.get_lang()
self.del_body(lang)
content = str(content)
header = '<body xmlns="%s"' % XHTML_NS
if lang:
header = '%s xml:lang="%s"' % (header, lang)
content = '%s>%s</body>' % (header, content)
xhtml = ET.fromstring(content)
self.xml.append(xhtml)
if lang == '*':
for sublang, subcontent in content.items():
self.set_body(subcontent, sublang)
else:
if isinstance(content, type(ET.Element('test'))):
content = ET.tostring(content)
else:
content = str(content)
header = '<body xmlns="%s"' % XHTML_NS
if lang:
header = '%s xml:lang="%s"' % (header, lang)
content = '%s>%s</body>' % (header, content)
xhtml = ET.fromstring(content)
self.xml.append(xhtml)
def get_body(self, lang=None):
"""Return the contents of the HTML body."""