request encoding in five.formlib
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
five.formlib |
Invalid
|
Undecided
|
Unassigned |
Bug Description
hi all,
I use five.formlib with plone 4. i found that the request is transformed to unicode but never restored at the end of rendering a template. If some code depends on the request after rendering the formlib template it will break.
All in all this seems dangerous to me, is there another way to accomplish this?
Regards, sam
Raptus AG
the following hack works for me, but looks ugly:
--- src/five.
+++ src/five.
@@ -47,10 +47,15 @@
# BBB: for CMFDefault < 2.3 (explicit charset required)
+
+ # only change a copy from form to unicode and restore it at the end.
+ old_request_form = self.request.form
+ self.request.form = self.request.
# BBB: for Zope < 2.14
if not getattr(
+ self.request.form = old_request_form
class FormBase(
The five.formlib project on Launchpad has been archived at the request of the Zope developers (see https:/ /answers. launchpad. net/launchpad/ +question/ 683589 and https:/ /answers. launchpad. net/launchpad/ +question/ 685285). If this bug is still relevant, please refile it at https:/ /github. com/zopefoundat ion/five. formlib.