diff --git a/CHANGES.rst b/CHANGES.rst index c3ce36e..fc140ff 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,9 @@ Changelog 1.0 (unreleased) ---------------- +- Fixed UnicodeDecodeError in @@autocomplete-search + [vincentfretin] + - Internationalized two messages. [vincentfretin] diff --git a/src/collective/contact/widget/widgets.py b/src/collective/contact/widget/widgets.py index 4691d6f..78ffc36 100644 --- a/src/collective/contact/widget/widgets.py +++ b/src/collective/contact/widget/widgets.py @@ -268,5 +268,5 @@ class AutocompleteSearch(BaseAutocompleteSearch): else: terms = set() - return '\n'.join(["|".join((t.token, t.title or t.token, t.portal_type, t.url, t.extra)) + return u'\n'.join([u"|".join((t.token, t.title or t.token, t.portal_type, t.url, t.extra)) for t in sorted(terms, key=lambda t: t.title)])