[Zope3-checkins] CVS: Zope3/src/zope/tal - dummyengine.py:1.11.20.3 htmltalparser.py:1.4.34.3

Stephan Richter srichter at cosmos.phy.tufts.edu
Wed Aug 20 17:51:18 EDT 2003


Update of /cvs-repository/Zope3/src/zope/tal
In directory cvs.zope.org:/tmp/cvs-serv24655/src/zope/tal

Modified Files:
      Tag: srichter-inlinepython-branch
	dummyengine.py htmltalparser.py 
Log Message:
'type' is the correct attribute name in script. It also requires that the
value is a content type, so I changed everything to "text/server-python".

Also, now the type attribute value *must* start with "text/server-" for the
TAL interpreter to kick in.


=== Zope3/src/zope/tal/dummyengine.py 1.11.20.2 => 1.11.20.3 ===
--- Zope3/src/zope/tal/dummyengine.py:1.11.20.2	Wed Aug 20 11:24:17 2003
+++ Zope3/src/zope/tal/dummyengine.py	Wed Aug 20 16:50:47 2003
@@ -209,7 +209,7 @@
             globals = self.globals.copy()
             locals = self.locals.copy()
             
-        assert lang == 'server-python'
+        assert lang == 'text/server-python'
         import sys, StringIO
 
         # Removing probable comments


=== Zope3/src/zope/tal/htmltalparser.py 1.4.34.2 => 1.4.34.3 ===
--- Zope3/src/zope/tal/htmltalparser.py:1.4.34.2	Wed Aug 20 16:16:40 2003
+++ Zope3/src/zope/tal/htmltalparser.py	Wed Aug 20 16:50:47 2003
@@ -148,10 +148,10 @@
                 self.getpos())
         # Support for inline Python code.
         if tag == 'script':
-            lang_attr = filter(lambda a: a[0] == 'lang', attrlist)
-            if lang_attr:
-                attrlist.remove(lang_attr[0])
-                taldict = {'script': lang_attr[0][1], 'omit-tag': ''}
+            type_attr = filter(lambda a: a[0] == 'type', attrlist)
+            if type_attr and type_attr[0][1].startswith('text/server-'):
+                attrlist.remove(type_attr[0])
+                taldict = {'script': type_attr[0][1], 'omit-tag': ''}
         self.tagstack.append(tag)
         self.gen.emitStartElement(tag, attrlist, taldict, metaldict, i18ndict,
                                   self.getpos())




More information about the Zope3-Checkins mailing list