Commit 96b45d98 authored by Vincent Pelletier's avatar Vincent Pelletier

Provided values are not always strings (int, Messages, ...) but they will...

Provided values are not always strings (int, Messages, ...) but they will anyway get cast into strings in Formulator's render_element. So always cast before escaping.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20946 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 158217c5
...@@ -611,14 +611,14 @@ def SingleItemsWidget_render_items(self, field, key, value, REQUEST): ...@@ -611,14 +611,14 @@ def SingleItemsWidget_render_items(self, field, key, value, REQUEST):
if item_value == value and not selected_found: if item_value == value and not selected_found:
rendered_item = self.render_selected_item(escape(item_text), rendered_item = self.render_selected_item(escape(str(item_text)),
item_value, item_value,
key, key,
css_class, css_class,
extra_item) extra_item)
selected_found = 1 selected_found = 1
else: else:
rendered_item = self.render_item(escape(item_text), rendered_item = self.render_item(escape(str(item_text)),
item_value, item_value,
key, key,
css_class, css_class,
......
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