mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2024-12-13 18:31:10 +01:00
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:
parent
684115cf19
commit
f6be2403f5
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user