Skip to content

Commit

Permalink
Use plone.base.utils.safe_text ourselves.
Browse files Browse the repository at this point in the history
  • Loading branch information
mauritsvanrees committed Jun 19, 2024
1 parent 6ab3cd2 commit f0ba7d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Products/PlonePAS/plugins/property.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
from AccessControl.class_init import InitializeClass
from App.special_dtml import DTMLFile
from BTrees.OOBTree import OOBTree
from plone.base.utils import safe_text
from Products.CMFCore.utils import getToolByName
from Products.PlonePAS.interfaces.plugins import IMutablePropertiesPlugin
from Products.PlonePAS.sheet import MutablePropertySheet
from Products.PlonePAS.sheet import validateValue
from Products.PlonePAS.utils import safe_unicode
from Products.PluggableAuthService.interfaces.plugins import IPropertiesPlugin
from Products.PluggableAuthService.interfaces.plugins import IUserEnumerationPlugin
from Products.PluggableAuthService.plugins.BasePlugin import BasePlugin
Expand Down Expand Up @@ -219,9 +219,9 @@ def testMemberData(self, memberdata, criteria, exact_match=False):
return False

if isStringType(testvalue):
testvalue = safe_unicode(testvalue.lower())
testvalue = safe_text(testvalue.lower())
if isStringType(value):
value = safe_unicode(value.lower())
value = safe_text(value.lower())

if exact_match:
if value != testvalue:
Expand Down
4 changes: 2 additions & 2 deletions src/Products/PlonePAS/tools/membership.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from DateTime import DateTime
from io import BytesIO
from OFS.Image import Image
from plone.base.utils import safe_text
from plone.protect.interfaces import IDisableCSRFProtection
from Products.CMFCore.MembershipTool import MembershipTool as BaseTool
from Products.CMFCore.permissions import ListPortalMembers
Expand All @@ -26,7 +27,6 @@
from Products.PlonePAS.events import UserLoggedOutEvent
from Products.PlonePAS.interfaces import membership
from Products.PlonePAS.utils import cleanId
from Products.PlonePAS.utils import safe_unicode
from Products.PlonePAS.utils import scale_image
from zExceptions import BadRequest
from ZODB.POSException import ConflictError
Expand Down Expand Up @@ -167,7 +167,7 @@ def searchForMembers(self, REQUEST=None, **kw):
searchmap = REQUEST
for key, value in searchmap.items():
if isinstance(value, bytes):
searchmap[key] = safe_unicode(value)
searchmap[key] = safe_text(value)
else:
searchmap = kw

Expand Down

0 comments on commit f0ba7d7

Please sign in to comment.