@register.filter(needs_autoescape=True)<EOL>def link_to_modal(link_text, index, autoescape=True):  
link = (<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>).format(<EOL>index=index,<EOL>link_text=link_text,<EOL>)<EOL>return mark_safe(link)<EOL>
Django template filter that returns an anchor with attributes useful for course modal selection.

General Usage:
    {{ link_text|link_to_modal:index }}

Examples:
    {{ course_title|link_to_modal:forloop.counter0 }}
    {{ course_title|link_to_modal:3 }}
    {{ view_details_text|link_to_modal:0 }}