From cfeab0aadf7ba357a997c4a0203bcf4176ecc0d3 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sat, 24 Feb 2007 17:23:19 -0800 Subject: added escape and wordwrap filters to code viewing --- bn_django/git_browse/templates/git_browse/blob.html | 2 +- bn_django/git_browse/templates/git_browse/commit.html | 2 +- bn_django/git_browse/templates/git_browse/full_log.html | 2 +- bn_django/settings.py | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) (limited to 'bn_django') diff --git a/bn_django/git_browse/templates/git_browse/blob.html b/bn_django/git_browse/templates/git_browse/blob.html index 1fb1437..3730807 100644 --- a/bn_django/git_browse/templates/git_browse/blob.html +++ b/bn_django/git_browse/templates/git_browse/blob.html @@ -7,7 +7,7 @@ {{ size|filesizeformat }}

Download zip

Raw contents

-
{{ contents }}
+
{{ contents|escape|wordwrap:80 }}
{% else %}

No such object: {{ hash }}

{% endif %} {% endblock %} diff --git a/bn_django/git_browse/templates/git_browse/commit.html b/bn_django/git_browse/templates/git_browse/commit.html index 3a1aefd..b4ee4a6 100644 --- a/bn_django/git_browse/templates/git_browse/commit.html +++ b/bn_django/git_browse/templates/git_browse/commit.html @@ -22,7 +22,7 @@

Committer Date

{{ commit.committer_date }}
{% if commit.rawdiff %} -
{{ commit.rawdiff }}
+
{{ commit.rawdiff|escape|wordwrap:80 }}
{% else %}No diff{% endif %} {% else %}

No such object: {{ hash }}

diff --git a/bn_django/git_browse/templates/git_browse/full_log.html b/bn_django/git_browse/templates/git_browse/full_log.html index d2a1311..913a3c4 100644 --- a/bn_django/git_browse/templates/git_browse/full_log.html +++ b/bn_django/git_browse/templates/git_browse/full_log.html @@ -11,7 +11,7 @@
Author: {{ item.author }}
Date: {{ item.date }}
Comment: -
{{ item.comment|wordwrap:80 }}
+
{{ item.comment|escape|wordwrap:80 }}
{% endfor %} {% endif %} {% endblock %} diff --git a/bn_django/settings.py b/bn_django/settings.py index 55444f7..8041cc1 100644 --- a/bn_django/settings.py +++ b/bn_django/settings.py @@ -81,6 +81,7 @@ INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.flatpages', 'django.contrib.markup', + 'django.contrib.comments', 'bn_django.photos', 'bn_django.git_wiki', 'bn_django.git_browse', -- cgit v1.2.3