[ZPT] CVS: Packages/TAL - TALDefs.py:1.17
guido@digicool.com
guido@digicool.com
Wed, 11 Apr 2001 13:52:57 -0400 (EDT)
Update of /cvs-repository/Packages/TAL
In directory korak:/tmp/cvs-serv13179
Modified Files:
TALDefs.py
Log Message:
Fix two problems reported by "Denis S. Otkidach" <ods@fep.ru>:
1. Some browsers don't understand attribute values in single quotes,
so always use double quotes.
2. An undefined variable was referenced in the error reporting code in
parseSubstitution(). (The error reporting cannot be reached unless
_subst_re is changed -- but it is still a bug. :-)
--- Updated File TALDefs.py in package Packages/TAL --
--- TALDefs.py 2001/04/10 02:07:28 1.16
+++ TALDefs.py 2001/04/11 17:52:55 1.17
@@ -172,8 +172,7 @@
def parseSubstitution(arg, position=(None, None)):
m = _subst_re.match(arg)
if not m:
- raise TALError("Bad syntax in substitution text: " + `onError`,
- position)
+ raise TALError("Bad syntax in substitution text: " + `arg`, position)
key, expr = m.group(1, 2)
if not key:
key = "text"
@@ -215,7 +214,4 @@
_cgi = cgi
del cgi
def quote(s):
- if '"' in s and "'" not in s:
- return "'%s'" % _cgi.escape(s)
- else:
- return '"%s"' % _cgi.escape(s, 1)
+ return '"%s"' % _cgi.escape(s, 1)