Tuchuanhuhuhu commited on
Commit
d1d7430
·
1 Parent(s): e89d2ee

修复$符问题

Browse files
Files changed (1) hide show
  1. ChuanhuChatbot.py +2 -0
ChuanhuChatbot.py CHANGED
@@ -69,6 +69,8 @@ def parse_text(text):
69
  line = line.replace("!", "!")
70
  line = line.replace("(", "(")
71
  line = line.replace(")", ")")
 
 
72
  lines[i] = "<br>"+line
73
  text = "".join(lines)
74
  return text
 
69
  line = line.replace("!", "&#33;")
70
  line = line.replace("(", "&#40;")
71
  line = line.replace(")", "&#41;")
72
+ line = line.replace("$", "&#36;")
73
+ line = line.replace("`", "&#96;")
74
  lines[i] = "<br>"+line
75
  text = "".join(lines)
76
  return text