diff --git a/conntrackt/templatetags/conntrackt_tags.py b/conntrackt/templatetags/conntrackt_tags.py
--- a/conntrackt/templatetags/conntrackt_tags.py
+++ b/conntrackt/templatetags/conntrackt_tags.py
@@ -22,6 +22,7 @@
# Django imports.
from django import template
from django.core import urlresolvers
+from django.utils.html import format_html
# Get an instance of Django's template library.
@@ -54,26 +55,34 @@ def html_link(text, view, *args, **kwarg
"""
+ # Verify the passed-in keyword arguments first.
+ for key in kwargs.keys():
+ if key not in ("get", "class", "title", "id"):
+ raise template.TemplateSyntaxError("Unknown argument for 'html_link' tag: %r" % key)
+
# Generate the URL by using the supplied view name and arguments that should
# be passed to the view.
url = urlresolvers.reverse(view, args=args)
# Set-up the base pattern (url, parameters, text).
- pattern = '%s'
+ if 'get' in kwargs:
+ pattern = '{text}'
# Render the tag.
- return pattern % (url, params, text)
+ return format_html(pattern, url=url, text=text, **kwargs)
@register.simple_tag(takes_context=True)