Tuchuanhuhuhu commited on
Commit
4e88a40
1 Parent(s): 8526e40

修复更多符号显示

Browse files
Files changed (1) hide show
  1. ChuanhuChatbot.py +3 -1
ChuanhuChatbot.py CHANGED
@@ -67,8 +67,10 @@ def parse_text(text):
67
  line = line.replace("}", "}")
68
  line = line.replace("[", "[")
69
  line = line.replace("]", "]")
70
- line = line.replace("|", "|")
71
  line = line.replace("-", "-")
 
 
 
72
  lines[i] = "<br>"+line
73
  text = "".join(lines)
74
  return text
 
67
  line = line.replace("}", "&#125;")
68
  line = line.replace("[", "&#91;")
69
  line = line.replace("]", "&#93;")
 
70
  line = line.replace("-", "&#45;")
71
+ line = line.replace("#", "&#35;")
72
+ line = line.replace(".", "&#46;")
73
+ line = line.replace("!", "&#33;")
74
  lines[i] = "<br>"+line
75
  text = "".join(lines)
76
  return text