From ff427f6d9bbcedebcdfc671bc13ab54a225b6cdf Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 27 Aug 2010 09:50:55 -0500 Subject: Mark todolist description as being safe to contain HTML Hopefully we can trust our developers on this one. :) Signed-off-by: Dan McGee --- templates/todolists/email_notification.txt | 2 +- templates/todolists/list.html | 3 ++- templates/todolists/public_list.html | 2 +- templates/todolists/todolist_confirm_delete.html | 4 ++-- templates/todolists/view.html | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/templates/todolists/email_notification.txt b/templates/todolists/email_notification.txt index 1e631a32..abe1dbf3 100644 --- a/templates/todolists/email_notification.txt +++ b/templates/todolists/email_notification.txt @@ -12,4 +12,4 @@ has been added to this todo list: Creator: {{todolist.creator.get_full_name}} Name: {{todolist.name}} Description: -{{todolist.description|wordwrap:69}}{% endautoescape %} +{{todolist.description|striptags|wordwrap:69}}{% endautoescape %} diff --git a/templates/todolists/list.html b/templates/todolists/list.html index 9d278aa5..3b2f75c2 100644 --- a/templates/todolists/list.html +++ b/templates/todolists/list.html @@ -1,4 +1,5 @@ {% extends "base.html" %} + {% block title %}Arch Linux - Todo Lists{% endblock %} {% block content %} @@ -29,7 +30,7 @@ title="View todo list: {{ list.name }}">{{ list.name }} {{ list.date_added }} {{ list.creator.get_full_name }} - {{ list.description }} + {{ list.description|safe }} {% if list.complete %}Complete {% else %}Incomplete{% endif %} diff --git a/templates/todolists/public_list.html b/templates/todolists/public_list.html index e2f2ef9a..72841200 100644 --- a/templates/todolists/public_list.html +++ b/templates/todolists/public_list.html @@ -9,7 +9,7 @@ {% for list in todo_lists %}

{{list.name}}

-

{{list.description}}

+

{{list.description|safe}}

    {% for pkg in list.packages %}
  • {{pkg.pkg.pkgname}}
  • diff --git a/templates/todolists/todolist_confirm_delete.html b/templates/todolists/todolist_confirm_delete.html index 26cc4b8b..5545462f 100644 --- a/templates/todolists/todolist_confirm_delete.html +++ b/templates/todolists/todolist_confirm_delete.html @@ -6,10 +6,10 @@

    Delete Todo List: {{object.name}}

    -

    You are about to delete the following todo list:

    +

    You are about to delete the selected todo list:

    -

    {{object.name}}: {{object.description}}

    +

    {{object.description|safe|linebreaks}}

    Are you sure?

    diff --git a/templates/todolists/view.html b/templates/todolists/view.html index 6b6e9845..1c253921 100644 --- a/templates/todolists/view.html +++ b/templates/todolists/view.html @@ -17,7 +17,7 @@ {% endif %}
-

{{list.description|linebreaks}}

+

{{list.description|safe|linebreaks}}

-- cgit v1.2.3-55-g3dc8