1
0
Fork 0

修复 Bug 493。不要转义(escape)表单提交的内容。否则类 WordFreq 不能正确工作,比如转义会把单引号变成 ',这不利于 WordFreq 类处理。

Alpha-snapshot20230621
Hui Lan 2023-07-07 16:13:48 +08:00
parent 287d496ae9
commit 807d74741b
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ def userpage(username):
user_freq_record = path_prefix + 'static/frequency/' + 'frequency_%s.pickle' % (username)
if request.method == 'POST': # when we submit a form
content = escape(request.form['content'])
content = request.form['content']
f = WordFreq(content)
lst = f.get_freq()
return render_template('userpage_post.html',username=username,lst = lst, yml=Yaml.yml)