diff --git a/templates/tracker/issue_details.html b/templates/tracker/issue_details.html index 79a9bf3..0422336 100644 --- a/templates/tracker/issue_details.html +++ b/templates/tracker/issue_details.html @@ -34,7 +34,7 @@
  - {{ event.author}} {{ event }} {{ event.date|naturaltime }} + {{ event.author}} {{ event|safe }} {{ event.date|naturaltime }} {% if event.code == event.DESCRIBE %}
{% if perm.delete_issue %} diff --git a/tracker/models.py b/tracker/models.py index 8a97b0b..fc6366e 100644 --- a/tracker/models.py +++ b/tracker/models.py @@ -1,7 +1,7 @@ from django.db import models from django.core.validators import RegexValidator from django.utils.safestring import mark_safe -from django.utils.html import escape +from django.utils.html import escape, format_html from django.utils.encoding import python_2_unicode_compatible from django import VERSION @@ -359,10 +359,7 @@ class Event(models.Model): else: return None - # Escape args - safe_args = {k: escape(v) for k, v in args.items()} - - return mark_safe(description.format(**safe_args)) + return format_html(description, **args) if VERSION < (1, 7):