diff options
author | R. Tyler Ballance <tyler@monkeypox.org> | 2009-11-16 10:44:43 -0800 |
---|---|---|
committer | R. Tyler Ballance <tyler@monkeypox.org> | 2009-11-16 10:44:43 -0800 |
commit | e43765a679b84c52df875e9629d303e304af50a1 (patch) | |
tree | e8c275b8d9edfcb55af6706da64d90eae57b5c8c | |
parent | 47fbe57de8fc7fab20fd2d6b381ffbae411b74bc (diff) | |
download | python-cheetah-e43765a679b84c52df875e9629d303e304af50a1.tar.gz |
Prevent Template.compile() from creating classnames with numerous leading underscores
Issue originally reported by Kirill Uhanov <kirill.uhanov@intel.com> on the mailing
list (see: "problem with include directive on cheetah 2.4.0")
-rw-r--r-- | cheetah/Template.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cheetah/Template.py b/cheetah/Template.py index 2b789e7..430a863 100644 --- a/cheetah/Template.py +++ b/cheetah/Template.py @@ -640,7 +640,7 @@ class Template(Servlet): if not isinstance(className, (types.NoneType, basestring)): raise TypeError(errmsg % ('className', 'string or None')) - className = className or moduleName + className = re.sub(r'^_+','', className or moduleName) if mainMethodName is Unspecified: mainMethodName = klass._CHEETAH_defaultMainMethodNameForTemplates |