Issue
In my Django Templates, I want to pass in a string as follows:
trademard = "MyCompany ™"
and it will show up as the correct HTML entity of TM
However, when it is passed in, ™ is turned into ™
How can I get my desired results w/o surrounding the html block w/ {% verbatim %}
Thanks
Solution
I found my answer:
from django.utils.safestring import mark_safe
mystring = mark_safe("MyCompany ™")
works great!
Answered By - KingFish
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.