How can I disable autoescape in django feeds?
I am using django framework to organize rss feeds for my website. I need to put some hyperlinks to feed the items, but all of them are autoescaped ("<" is replaced with "& lt;", etc.). Is it possible to save tags in my feed (as I understand it, I cannot use {% autoescape off%} in feed templates)? Thank.
source to share
Please read Auto Escaping HTML in Django and try the following syntax. Where data is the variable that contains your link
{{ data|safe }}
source to share
As mentioned in shake, you can use a "safe" filter, but it's annoying if you want to turn off auto-protection frequently. Django also supports {% autoescape off%} {% autoescape end%} blocks, everything inside the block will not autoplay.
EDITED: Sorry, I didn't fully read your question in title only :). Why can't you use the autoescape tag in your feeds? There are no restrictions.
source to share