Adding code to work around a bug in htmlfill that prevents proper support

for new HTML5 input types (e.g., type="search").

Details of bug and workaround can be found at:
http://sourceforge.net/tracker/?func=detail&aid=3029079&group_id=91231&atid=596416
This commit is contained in:
Ryan Petrello
2011-06-05 23:10:14 -04:00
parent 9d8837f49f
commit f1bd2b237a

View File

@@ -457,7 +457,7 @@ class Pecan(object):
params = request.environ.pop('pecan.params')
if request.pecan['validation_errors'] and _htmlfill is not None and request.pecan['content_type'] == 'text/html':
errors = request.pecan['validation_errors']
result = htmlfill.render(result, defaults=params, errors=errors, **_htmlfill)
result = htmlfill.render(result, defaults=params, errors=errors, text_as_default=True, **_htmlfill)
# If we are in a test request put the namespace where it can be
# accessed directly