Add markdown support for the security patch details fields
authorJonathan S. Katz <jonathan.katz@excoventures.com>
Sun, 28 Mar 2021 16:36:47 +0000 (12:36 -0400)
committerJonathan S. Katz <jonathan.katz@excoventures.com>
Sun, 28 Mar 2021 16:36:47 +0000 (12:36 -0400)
It turns out that a lot of the detailed descriptions can benefit
from things like paragraphs and some formatting, so it is better
to render it in markdown.

This does not show the markdown in a preview view due to a bunch
of reasons, but future work can improve upon that.

templates/security/details.html

index 0e894c5a9df8ae32313fbd1867f550931ef3ff63..c7622e417dd37b7dae2bb735250c536040050233 100644 (file)
@@ -1,4 +1,5 @@
 {%extends "base/page.html"%}
+{%load pgmarkdown%}
 {%block title%}CVE-{{ security_patch.cve }}: {{ security_patch.description }}{%endblock%}
 {%block contents%}
 
@@ -6,7 +7,7 @@
 <h3>{{ security_patch.description }}</h3>
 
 {% if security_patch.details %}
-<p>{{ security_patch.details }}</p>
+{{ security_patch.details|markdown }}
 {% endif %}
 
 <h2>Version Information</h2>