Commit 2b336df9 authored by Jérome Perrin's avatar Jérome Perrin

Listbox: support non ascii URL in all cases

parent 85f3eae0
...@@ -2445,6 +2445,9 @@ class ListBoxHTMLRendererLine(ListBoxRendererLine): ...@@ -2445,6 +2445,9 @@ class ListBoxHTMLRendererLine(ListBoxRendererLine):
except AttributeError: except AttributeError:
pass pass
if isinstance(url, str):
url = unicode(url, encoding)
if editable_field is not None: if editable_field is not None:
uid = self.getUid() uid = self.getUid()
key = '%s_%s' % (editable_field.getId(), uid) key = '%s_%s' % (editable_field.getId(), uid)
...@@ -2526,8 +2529,6 @@ class ListBoxHTMLRendererLine(ListBoxRendererLine): ...@@ -2526,8 +2529,6 @@ class ListBoxHTMLRendererLine(ListBoxRendererLine):
if url is not None: if url is not None:
# JPS-XXX - I think we should not display a URL for objects # JPS-XXX - I think we should not display a URL for objects
# which do not have the View permission # which do not have the View permission
if isinstance(url, str):
url = unicode(url, encoding)
html = u'<a href="%s">%s</a>' % (url, html) html = u'<a href="%s">%s</a>' % (url, html)
html_list.append((html, original_value, error, editable_field, url)) html_list.append((html, original_value, error, editable_field, url))
......
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