diff options
Diffstat (limited to 'Code/html_network.py')
-rw-r--r-- | Code/html_network.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Code/html_network.py b/Code/html_network.py index 22912d0..dea1456 100644 --- a/Code/html_network.py +++ b/Code/html_network.py @@ -20,6 +20,7 @@ from datetime import datetime import collections, re, glob
from geneid2name import make_gene_name_AGI_map_dict
from param4net import make_global_param_dict
+import json
## Global variables
REGENERATE_ALL_EDGE_FILES = 'YES'
@@ -54,7 +55,7 @@ def get_name(s, agi2name_dict): if s in agi2name_dict:
name = agi2name_dict[s]
lst = name.split(';')
- return lst[0]
+ return json.dumps(lst[0]) # use json.dumps to escape prime character in 'F3'H'. Something like {genename:'F3'H'} is invalid in JavaScript.
else:
return s
|