From 69bffea91e6042fc89e225c2ce8a563b59e05af0 Mon Sep 17 00:00:00 2001 From: Rob Court Date: Mon, 24 Jun 2024 14:18:09 +0100 Subject: [PATCH] handling non breaking space encoding Avoiding using unicode.normalize to avoid adding any unintended changes Resolves https://github.com/VirtualFlyBrain/VFB_neo4j/issues/289 --- src/uk/ac/ebi/vfb/neo4j/neo4j_tools.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/uk/ac/ebi/vfb/neo4j/neo4j_tools.py b/src/uk/ac/ebi/vfb/neo4j/neo4j_tools.py index 2569cc2f..e48983e8 100644 --- a/src/uk/ac/ebi/vfb/neo4j/neo4j_tools.py +++ b/src/uk/ac/ebi/vfb/neo4j/neo4j_tools.py @@ -180,6 +180,7 @@ def results_2_dict_list(results): def escape_string(strng): if type(strng) == str: + strng = re.replace(u'\xa0', u' ') strng = re.sub(r'\\', r'\\\\', strng) strng = re.sub('"', '\\"', strng) return strng