Keldos commited on
Commit
78742bf
·
1 Parent(s): 9f00b35

convert "修复了大段用户输入时溢出的问题"

Browse files

this partially convert ead342edcea32964bc51b80c6f9d0a93b5eee6f2

Files changed (1) hide show
  1. modules/utils.py +1 -2
modules/utils.py CHANGED
@@ -115,8 +115,7 @@ def convert_mdtext(md_text):
115
 
116
 
117
  def convert_asis(userinput):
118
- escaped_html = html.escape(userinput).replace(" ", "&nbsp;").replace("\n", "<br>")
119
- return f"{escaped_html}"+ALREADY_CONVERTED_MARK
120
 
121
  def detect_converted_mark(userinput):
122
  if userinput.endswith(ALREADY_CONVERTED_MARK):
 
115
 
116
 
117
  def convert_asis(userinput):
118
+ return f"<pre>{html.escape(userinput)}</pre>"+ALREADY_CONVERTED_MARK
 
119
 
120
  def detect_converted_mark(userinput):
121
  if userinput.endswith(ALREADY_CONVERTED_MARK):