Commit 20b1ed54 authored by Jérome Perrin's avatar Jérome Perrin

Request form was included in HTML, so this cause problem when it contains "

This fixes testSimpleRelationFieldWheelButtonQuotedFields
Make sure to update ERP5Form and erp5_core at same time


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33801 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b8a982e6
...@@ -70,6 +70,10 @@ if listbox_uid is not None:\n ...@@ -70,6 +70,10 @@ if listbox_uid is not None:\n
uids = selection_tool.getSelectionCheckedUidsFor(selection_name)\n uids = selection_tool.getSelectionCheckedUidsFor(selection_name)\n
\n \n
old_request = dict(saved_form_data)\n old_request = dict(saved_form_data)\n
for k, v in old_request.items():\n
if isinstance(v, str):\n
old_request[k] = v.decode(\'base64\')\n
\n
\n \n
field = getattr(context, form_id).get_field(field_id)\n field = getattr(context, form_id).get_field(field_id)\n
field_key = field.generate_field_key()\n field_key = field.generate_field_key()\n
...@@ -154,19 +158,21 @@ return edit_method(form_id,\n ...@@ -154,19 +158,21 @@ return edit_method(form_id,\n
<string>selected_uids</string> <string>selected_uids</string>
<string>dict</string> <string>dict</string>
<string>old_request</string> <string>old_request</string>
<string>_getiter_</string>
<string>k</string>
<string>v</string>
<string>isinstance</string>
<string>str</string>
<string>_write_</string>
<string>getattr</string> <string>getattr</string>
<string>field</string> <string>field</string>
<string>field_key</string> <string>field_key</string>
<string>len</string> <string>len</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>sub_field_key</string> <string>sub_field_key</string>
<string>str</string>
<string>_write_</string>
<string>container</string> <string>container</string>
<string>request</string> <string>request</string>
<string>request_form</string> <string>request_form</string>
<string>_getiter_</string>
<string>k</string>
<string>edit_method</string> <string>edit_method</string>
<string>True</string> <string>True</string>
</tuple> </tuple>
......
1517 1518
\ No newline at end of file \ No newline at end of file
...@@ -1207,6 +1207,8 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ): ...@@ -1207,6 +1207,8 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
saved_form_data = {} saved_form_data = {}
for key, value in REQUEST.form.items(): for key, value in REQUEST.form.items():
if not isinstance(value, FileUpload): if not isinstance(value, FileUpload):
if isinstance(value, basestring):
value = value.encode('base64')
saved_form_data[key] = value saved_form_data[key] = value
base_category = None base_category = None
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment