Skip to content

Commit 20a9304

Browse files
committed
feat(ui): improve advisory summary formatting and rendering
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
1 parent faab557 commit 20a9304

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

‎vulnerabilities/templates/advisory_detail.html‎

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,35 @@
44
{% load static %}
55
{% load show_cvss %}
66
{% load url_filters %}
7+
{% load utils %}
78

89
{% block title %}
910
VulnerableCode Advisory Details - {{ advisory.advisory_id }}
1011
{% endblock %}
1112

13+
{% block extrahead %}
14+
<style>
15+
.summary-text {
16+
line-height: 1.4;
17+
white-space: pre-wrap;
18+
word-break: break-word;
19+
}
20+
21+
div.summary-text a:link,
22+
div.summary-text a {
23+
color: #3273dc !important;
24+
}
25+
26+
div.summary-text a:visited {
27+
color: #8a4de8 !important;
28+
}
29+
30+
div.summary-text a:hover {
31+
color: #0a0a0a !important;
32+
}
33+
</style>
34+
{% endblock %}
35+
1236
{% block content %}
1337

1438
{% if advisory %}
@@ -124,7 +148,7 @@
124148
</tr>
125149
<tr>
126150
<td class="two-col-left">Summary</td>
127-
<td class="two-col-right wrap-strings">{{ advisory.summary }}
151+
<td class="two-col-right summary-text">{{ advisory.summary|normalize_links|urlize }}
128152
</td>
129153
</tr>
130154
{% if severity_score_range %}

0 commit comments

Comments
 (0)