@register.filter(u'fix_ampersands', is_safe=True)
@stringfilter
def fix_ampersands_filter(value):
 return fix_ampersands(value)

@ register . filter ( u'fix_ampersands' , is_safe = True ) @ stringfilter def fix_ampersands_filter ( value ) : return fix_ampersands ( value )
replaces ampersands with &amp; entities .