Let\'s say that I have this string:
s = \'Hello!
\'
When I pass this variable to a template, I want it to be rendered as raw
You pretty much covered it, those are indeed all the ways to disable autoescaping.
Are you sure the value you are talking about is actually s = '<p>Hello!</p>'
?
My hunch is that you have additional escaping somewhere in that string...
Look at the HTML source code, is it escaped!??? I don't think so. It should be printing letter by letter, just like this:
<
p
>
H
E
L
L
O
<
/
>
I think you should write as follows
{{s|escape|safe}}
it is ok for me