I noticed this behaviour while using pelican:
Template('<p>{{text|striptags|striptags}}</p>').render(text='<script src="http://chezsoi.org"/>')
is getting rendered as:
<script src="http://chezsoi.org"/>
I was counting on striptags output to be free of any HTML tag, which is false.
Hence my question: is there a "safer" alternative to the builtin striptags filter ?
I know that a quick solution is to chain calls to striptags:
'{{ <p>text|striptags|striptags|striptags }}</p>'
But in case an attacker has control over text content, they can double-HTML-escape the string, and so on and so on.