From dddf6058a9badfc5b13834f4e7cbaf555842b15a Mon Sep 17 00:00:00 2001 From: Ben Sturmfels Date: Thu, 1 Feb 2024 10:34:53 +1100 Subject: [PATCH] usethesource: Linkify URLs in description and comments, retain line breaks --- conservancy/usethesource/templates/usethesource/candidate.html | 2 +- .../usethesource/templates/usethesource/comment_partial.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conservancy/usethesource/templates/usethesource/candidate.html b/conservancy/usethesource/templates/usethesource/candidate.html index 3c50de9d..d38444bc 100644 --- a/conservancy/usethesource/templates/usethesource/candidate.html +++ b/conservancy/usethesource/templates/usethesource/candidate.html @@ -28,7 +28,7 @@ - {{ candidate.description|linebreaks }} + {{ candidate.description|urlize|linebreaksbr }} {% with comments=candidate.comment_set.all %} {% if comments or user.is_staff %}

Comments

{% endif %} diff --git a/conservancy/usethesource/templates/usethesource/comment_partial.html b/conservancy/usethesource/templates/usethesource/comment_partial.html index ccbfc0c6..d3fd63d7 100644 --- a/conservancy/usethesource/templates/usethesource/comment_partial.html +++ b/conservancy/usethesource/templates/usethesource/comment_partial.html @@ -3,5 +3,5 @@ edit delete {% endif %} -
{{ comment.message|linebreaks }} +
{{ comment.message|urlize|linebreaksbr }}