Fixes issue #51: links to other tickets (via #n syntax in followups etc) were

having their HTML escaped, so they didn't show up.

Thanks to Andreas Kotowicz for this patch.
This commit is contained in:
Ross Poulton 2009-03-08 06:13:51 +00:00
parent 684115cf19
commit f6be2403f5

View File

@ -15,6 +15,7 @@ import re
from django import template
from django.core.urlresolvers import reverse
from django.utils.safestring import mark_safe
from helpdesk.models import Ticket
@ -52,7 +53,7 @@ def num_to_link(text):
if ticket:
style = ticket.get_status_display()
text = "%s<a href='%s' class='ticket_link_status ticket_link_status_%s'>#%s</a>%s" % (text[:match.start()], url, style, match.groups()[0], text[match.end():])
return text
return mark_safe(text)
register = template.Library()
register.filter(num_to_link)