template.py fails with unicode
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
web.py |
Fix Released
|
High
|
Anand Chitipothu |
Bug Description
Template.py fails when the template string is UTF.
test 1:
t(u'$def with ()\nfoo")')() == 'foo\n'
Traceback (most recent call last):
File "template.py", line 881, in <module>
test()
File "template.py", line 869, in test
t(u'$def with ()\nfoo")')() == 'foo\n'
File "template.py", line 817, in __call__
return TestResult(
File "template.py", line 498, in __call__
return f.go()
File "template.py", line 760, in go
self.
File "template.py", line 552, in h
return getattr(self, 'h_' + item[WHAT])(item)
File "template.py", line 691, in h_line
raise WTF, x
__main__.WTF: foo")
test2:
def f(x): return x
t(u'$def with (f)\n$:
Traceback (most recent call last):
File "template.py", line 881, in <module>
test()
File "template.py", line 872, in test
t(u'$def with (f)\n$:
File "template.py", line 817, in __call__
return TestResult(
File "template.py", line 498, in __call__
return f.go()
File "template.py", line 760, in go
self.
File "template.py", line 552, in h
return getattr(self, 'h_' + item[WHAT])(item)
File "template.py", line 684, in h_line
o = self.h(x[NAME])
File "template.py", line 552, in h
return getattr(self, 'h_' + item[WHAT])(item)
File "template.py", line 611, in h_call
return call(*args, **kw)
TypeError: f() keywords must be strings
Changed in webpy: | |
assignee: | nobody → anandology |
importance: | Undecided → High |
milestone: | none → 0.23 |
status: | New → Confirmed |
Changed in webpy: | |
status: | Confirmed → Fix Committed |
Changed in webpy: | |
status: | Fix Committed → Fix Released |