forked from mrlan/EnglishPal
Fix Bug 541
parent
9a156ebf7e
commit
472c0c115f
|
@ -56,9 +56,9 @@ def article():
|
||||||
|
|
||||||
_articles = get_page_articles(_cur_page, _page_size)
|
_articles = get_page_articles(_cur_page, _page_size)
|
||||||
for article in _articles: # 获取每篇文章的title
|
for article in _articles: # 获取每篇文章的title
|
||||||
article = escape(article)
|
text = escape(article.text) # Fix XSS vulnerability, contributed by Xu Xuan
|
||||||
article.title = article.text.split("\n")[0]
|
article.title = text.split("\n")[0]
|
||||||
article.content = '<br/>'.join(article.text.split("\n")[1:])
|
article.content = '<br/>'.join(text.split("\n")[1:])
|
||||||
|
|
||||||
context = {
|
context = {
|
||||||
"article_number": _article_number,
|
"article_number": _article_number,
|
||||||
|
|
Loading…
Reference in New Issue