Escape XML for problems and comments
This commit is contained in:
parent
b77ef10dd5
commit
f6e77c67bf
1 changed files with 2 additions and 0 deletions
|
@ -33,6 +33,7 @@ class ProblemFeed(Feed):
|
||||||
desc = cache.get(key)
|
desc = cache.get(key)
|
||||||
if desc is None:
|
if desc is None:
|
||||||
desc = str(markdown(problem.description, 'problem'))[:500] + '...'
|
desc = str(markdown(problem.description, 'problem'))[:500] + '...'
|
||||||
|
desc = escape_xml_illegal_chars(desc)
|
||||||
cache.set(key, desc, 86400)
|
cache.set(key, desc, 86400)
|
||||||
return desc
|
return desc
|
||||||
|
|
||||||
|
@ -63,6 +64,7 @@ class CommentFeed(Feed):
|
||||||
desc = cache.get(key)
|
desc = cache.get(key)
|
||||||
if desc is None:
|
if desc is None:
|
||||||
desc = str(markdown(comment.body, 'comment'))
|
desc = str(markdown(comment.body, 'comment'))
|
||||||
|
desc = escape_xml_illegal_chars(desc)
|
||||||
cache.set(key, desc, 86400)
|
cache.set(key, desc, 86400)
|
||||||
return desc
|
return desc
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue