We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6c2164 commit 9a5d5fcCopy full SHA for 9a5d5fc
src/collective/collectionfilter/utils.py
@@ -1,6 +1,6 @@
1
from plone import api
2
+from plone.base.utils import safe_text
3
from Products.CMFCore.interfaces import IFolderish
-from Products.CMFPlone.utils import safe_unicode
4
5
6
try:
@@ -43,7 +43,7 @@ def safe_decode(val):
43
if isinstance(val, tuple):
44
return (safe_decode(it) for it in val)
45
if val:
46
- return safe_unicode(val)
+ return safe_text(val)
47
return val
48
49
@@ -58,7 +58,7 @@ def safe_encode(val):
58
59
return (safe_encode(it) for it in val)
60
if isinstance(val, str):
61
- return safe_unicode(val).encode("utf-8")
+ return safe_text(val).encode("utf-8")
62
63
64
0 commit comments