Merged [5534] from adam@nostrum.com, tweaked by henrik@levkowetz.com:

Fixes formatting for history page.  Relates to issue #210.
 - Legacy-Id: 5559
Note: SVN reference [5534] has been migrated to Git commit 820e87d09b
This commit is contained in:
Henrik Levkowetz 2013-03-13 14:55:41 +00:00
commit 7c5da4a92c
2 changed files with 2 additions and 2 deletions

View file

@ -500,7 +500,7 @@ def _get_history(doc, versions):
info['text'] = e.desc
info['by'] = e.by.plain_name()
info['textSnippet'] = truncatewords_html(format_textarea(fill(info['text'], 80)), 25)
info['textSnippet'] = truncatewords_html(info['text'], 25).replace('<br>',' ')
info['snipped'] = info['textSnippet'][-3:] == "..." and e.type != "new_revision"
results.append({'comment':e, 'info':info, 'date':e.time, 'is_com':True})

View file

@ -59,7 +59,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[Ballot {{ c.comment.get_ballot_display }}]<br />
{% endif %}
{% if c.info.snipped %}
<div id="commentS{{c.comment.id}}">{{ c.info.textSnippet|safe }}</div>
<div id="commentS{{c.comment.id}}">{{ c.info.textSnippet|safe|sanitize_html|safe }}</div>
<span class="comment_toggle" onclick="toggleComment({{c.comment.id}})" id="commentT{{c.comment.id}}">[show all]</span>
<div id="commentF{{c.comment.id}}" style="display:none;">
{{ c.info.text|safe|urlize|linebreaksbr|keep_spacing|sanitize_html|safe }}