From 7337a311922d8abdede2d1fdf68cd0beed43df94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Thu, 30 Jul 2020 00:16:22 +0200 Subject: [PATCH] linkify document descriptions --- sdbs_pile/pile/models.py | 2 +- sdbs_pile/pile/static/main.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdbs_pile/pile/models.py b/sdbs_pile/pile/models.py index 85cc6ad..b4bb946 100644 --- a/sdbs_pile/pile/models.py +++ b/sdbs_pile/pile/models.py @@ -63,7 +63,7 @@ class Document(SoftDeletableModel): @property def html_description(self): - return markdown2.markdown(self.description) + return bleach.linkify(markdown2.markdown(self.description)) @property def plain_description(self): diff --git a/sdbs_pile/pile/static/main.css b/sdbs_pile/pile/static/main.css index a09dd94..86aa423 100755 --- a/sdbs_pile/pile/static/main.css +++ b/sdbs_pile/pile/static/main.css @@ -193,7 +193,7 @@ ul > li:before { content: "➜ "; } -.doc-link a { +.document a { text-decoration: underline; }