diff --git a/arcgisUM.py b/arcgisUM.py index 98e511b..6c33b76 100644 --- a/arcgisUM.py +++ b/arcgisUM.py @@ -84,12 +84,8 @@ def getArcGISGroupByTitle(arcGISAdmin, title): :return: ArcGIS Group object or None :rtype: Group or None """ - searchString = "title:"+title - logger.debug("group search string: original: {}".format(searchString)) - - # quote characters that are special in the group search. - searchString = searchString.translate(str.maketrans({"?": r"\?","*": r"\*"})) - + escapedTitle = title.translate(str.maketrans({ '"': r'\"' })) + searchString = f'title:"{escapedTitle}"' logger.debug("group search string: escaped: {}".format(searchString)) try: