forked from mrlan/EnglishPal
修复 Bug 493。不要转义(escape)表单提交的内容。否则类 WordFreq 不能正确工作,比如转义会把单引号变成 ',这不利于 WordFreq 类处理。
parent
287d496ae9
commit
807d74741b
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue