zhaoyongjie commented on a change in pull request #17881:
URL: https://github.com/apache/superset/pull/17881#discussion_r794407593



##########
File path: superset/connectors/base/models.py
##########
@@ -396,7 +397,11 @@ def handle_single_value(value: Optional[FilterValue]) -> 
Optional[FilterValue]:
             ):
                 return datetime.utcfromtimestamp(value / 1000)
             if isinstance(value, str):
-                value = value.strip("\t\n'\"")
+                value = value.strip("\t\n")
+
+                quotes_value = re.findall(r"['|\"](.*?)['|\"]", value)
+                if len(quotes_value) == 1 and quotes_value[0] == 
value.strip("'\""):
+                    value = value.strip("'\"")

Review comment:
       Hi Beto, I have added some unit test for this change. please review 
again. Thanks.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to