i’m generating password with letters, digits and special characters ('¿"&$%/\>]{}(=?)*@!<-_¡+[') and i need to escape special character in templates like ASCII symbols, i generate a list of values like this
['0iw0Vqds)*\xc2Ni1P', '<gFLbKi}55(dN[R', '5G<E\\3}+vz72vu{', 'q3ojs$S33rQW$vs', 'IhAV$@3H3uNx\xbfOI', 'uA>>u\\g\xa1vf0\xc2o4t', 'siNyC$JX46bDXZ\xc2', 'R<8\xa1Y{\\]{Wcd/G>', 'D()SuvqdokB\xc2tcR', 'z31LPP{[$n{6_p\xc2']
i my template i do:
{% for var in password_list %}
{{var|escape}}
{% endfor %}
I’m using utf-8 in my views.py (# –– coding: UTF-8 –-). and i tried with {{var|escape}} and {{var|escape|safe}} but the templates only show in this case the third element in list (q3ojs$S33rQW$vs)
what can i do??
thanks in advance!
If you’re going to be using
¿and¡then you’re going to need to be usingunicodes instead ofstrs.Unicode in Python, Completely Demystified