From 0eaffafc73e048bad1ec77c9a17615420540e6b4 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Wed, 26 Oct 2022 01:11:37 -0500 Subject: [PATCH] Fix bug --- judge/feed.py | 2 +- judge/jinja2/markdown/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/judge/feed.py b/judge/feed.py index d665dd6..d553d1b 100644 --- a/judge/feed.py +++ b/judge/feed.py @@ -40,7 +40,7 @@ class ProblemFeed(Feed): key = "problem_feed:%d" % problem.id desc = cache.get(key) if desc is None: - desc = str(markdown(problem.description, "problem"))[:500] + "..." + desc = str(markdown(problem.description))[:500] + "..." desc = escape_xml_illegal_chars(desc) cache.set(key, desc, 86400) return desc diff --git a/judge/jinja2/markdown/__init__.py b/judge/jinja2/markdown/__init__.py index bcaed82..7b27076 100644 --- a/judge/jinja2/markdown/__init__.py +++ b/judge/jinja2/markdown/__init__.py @@ -49,7 +49,7 @@ ALLOWED_TAGS = bleach.sanitizer.ALLOWED_TAGS + [ "dd", "br", "details", - "summary" + "summary", ] ALLOWED_ATTRS = ["src", "width", "height", "href", "class", "open"]