Parsing templates with '%' in them?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I wanted to change the article.html template and do some CSS in it, but I
found mailman -silently- failed to parse the template files.
I've submitted the attached patch to at least log the fact the template
parsing failed.
- ----------------------- snip --------------------------------
- --- HyperArch.py 2003-12-26 14:41:30.000000000 -0600
+++ HyperArch.py-bob 2005-11-23 03:19:13.000000000 -0600
@@ -217,8 +217,9 @@
Utils.GetCharSet(lang),
'replace')
text = sdict.interpolate(utemplate)
- - except (TypeError, ValueError):
+ except (TypeError, ValueError), e:
# The template is really screwed up
+ syslog('error', 'The template is really screwed up: %s\n', e)
pass
# Make sure the text is in the given character set, or html-ify any
# bogus
# characters.
- ----------------------- snip --------------------------------
Next, I could not seem to isolate the "bug", but my CSS had the following
entries:
div#main {
margin-right: 20%;
}
div#menu {
width: 15%;
float: right;
}
The html template parser was failing on the 20% and the 15%, looking like it
was keying off the '%' for key=value in the SafeDict class and failing.
I "solved" the problem by making the CSS an external html reference, but I
thought I'd post this info to the developer list as a FYI.
- --
Bob Tanner
participants (1)
-
Bob Tanner