[Checkins] SVN: Sandbox/malthe/chameleon.html/src/chameleon/html/language.py API update.

Malthe Borch mborch at gmail.com
Tue Dec 2 08:39:40 EST 2008


Log message for revision 93539:
  API update.

Changed:
  U   Sandbox/malthe/chameleon.html/src/chameleon/html/language.py

-=-
Modified: Sandbox/malthe/chameleon.html/src/chameleon/html/language.py
===================================================================
--- Sandbox/malthe/chameleon.html/src/chameleon/html/language.py	2008-12-02 13:39:11 UTC (rev 93538)
+++ Sandbox/malthe/chameleon.html/src/chameleon/html/language.py	2008-12-02 13:39:40 UTC (rev 93539)
@@ -232,6 +232,8 @@
         config.XHTML_NS: {None: Element},
         config.META_NS: {None: MetaElement}}
 
+    fallback = Element
+    
 class DynamicHTMLParser(XSSTemplateParser):
     slots = attributes = ()
     
@@ -267,7 +269,8 @@
                 self.expand_tag(tag, matches, attribute)
 
     def parse(self, body):
-        root, doctype = super(DynamicHTMLParser, self).parse(body)
+        tree = super(DynamicHTMLParser, self).parse(body)
+        root = tree.getroot()
 
         # set template path attribute on root element
         root.attrib[
@@ -377,4 +380,4 @@
                     comment.attrib['{http://namespaces.repoze.org/xss}rebase'] = 'true'
                     comment.text = text
 
-        return root, doctype
+        return tree



More information about the Checkins mailing list