Skip to content

Commit 9a5d5fc

Browse files
committed
fix deprecated import
1 parent f6c2164 commit 9a5d5fc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/collective/collectionfilter/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from plone import api
2+
from plone.base.utils import safe_text
23
from Products.CMFCore.interfaces import IFolderish
3-
from Products.CMFPlone.utils import safe_unicode
44

55

66
try:
@@ -43,7 +43,7 @@ def safe_decode(val):
4343
if isinstance(val, tuple):
4444
return (safe_decode(it) for it in val)
4545
if val:
46-
return safe_unicode(val)
46+
return safe_text(val)
4747
return val
4848

4949

@@ -58,7 +58,7 @@ def safe_encode(val):
5858
if isinstance(val, tuple):
5959
return (safe_encode(it) for it in val)
6060
if isinstance(val, str):
61-
return safe_unicode(val).encode("utf-8")
61+
return safe_text(val).encode("utf-8")
6262
return val
6363

6464

0 commit comments

Comments
 (0)