mark_safe
This commit is contained in:
parent
3ac7ed5e42
commit
cedf131f4d
|
@ -1,5 +1,5 @@
|
||||||
from django import template
|
from django import template
|
||||||
|
from django.utils.safestring import mark_safe
|
||||||
register = template.Library()
|
register = template.Library()
|
||||||
|
|
||||||
def make_li(value):
|
def make_li(value):
|
||||||
|
@ -7,6 +7,6 @@ def make_li(value):
|
||||||
ret = ''
|
ret = ''
|
||||||
for l in lines:
|
for l in lines:
|
||||||
ret += "<li>%s</li>" % l
|
ret += "<li>%s</li>" % l
|
||||||
return ret
|
return mark_safe(ret)
|
||||||
|
|
||||||
register.filter("make_li", make_li)
|
register.filter("make_li", make_li)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user