Skip to content

Commit 897b77d

Browse files
committed
Provide better handling of both text/plain document comments and document comments which contain html tags. Adds urlization, linebreak-preservation and html sanitization. Html sanitization would be better applied when adding comments, but we're not yet a position to enforce this for all input paths.
- Legacy-Id: 2240
1 parent b1793ed commit 897b77d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ietf/templates/idrfc/doc_history.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@
6262
<div id="commentS{{c.comment.id}}">{{ c.info.textSnippet|safe }}</div>
6363
<span class="comment_toggle" onclick="toggleComment({{c.comment.id}})" id="commentT{{c.comment.id}}">[show all]</span>
6464
<div id="commentF{{c.comment.id}}" style="display:none;">
65-
{{c.info.text|fill:"80"|safe}}
65+
{{ c.info.text|fill:"80"|safe|urlize|linebreaksbr|keep_spacing|sanitize_html|safe }}
6666
</div>
6767
{% else %}
68-
{{ c.info.text|fill:"80"|safe}}
68+
{{ c.info.text|fill:"80"|safe|urlize|linebreaksbr|keep_spacing|sanitize_html|safe }}
6969
{% endif %}
7070
</td>
7171
{% endif %}

0 commit comments

Comments
 (0)