Skip to content

Commit 7c5da4a

Browse files
committed
Merged [5534] from adam@nostrum.com, tweaked by henrik@levkowetz.com:
Fixes formatting for history page. Relates to issue adamlaska#210. - Legacy-Id: 5559 Note: SVN reference [5534] has been migrated to Git commit 820e87d
2 parents fc5e944 + 820e87d commit 7c5da4a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

ietf/idrfc/views_doc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ def _get_history(doc, versions):
500500

501501
info['text'] = e.desc
502502
info['by'] = e.by.plain_name()
503-
info['textSnippet'] = truncatewords_html(format_textarea(fill(info['text'], 80)), 25)
503+
info['textSnippet'] = truncatewords_html(info['text'], 25).replace('<br>',' ')
504504
info['snipped'] = info['textSnippet'][-3:] == "..." and e.type != "new_revision"
505505
results.append({'comment':e, 'info':info, 'date':e.time, 'is_com':True})
506506

ietf/templates/idrfc/doc_history.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
[Ballot {{ c.comment.get_ballot_display }}]<br />
6060
{% endif %}
6161
{% if c.info.snipped %}
62-
<div id="commentS{{c.comment.id}}">{{ c.info.textSnippet|safe }}</div>
62+
<div id="commentS{{c.comment.id}}">{{ c.info.textSnippet|safe|sanitize_html|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;">
6565
{{ c.info.text|safe|urlize|linebreaksbr|keep_spacing|sanitize_html|safe }}

0 commit comments

Comments
 (0)