can't encode single quote (') using django's render_to_string

django, quotes, render-to-string, unicode

Solution

Automatic escaping. Link now changed to https://code.djangoproject.com/wiki/AutoEscaping

Problem

i have a problem with django's render_to_string and encoding single quotes. ``` ... = render_to_string('dummy.txt', {'request':request, 'text':text,}, context_instance=RequestContext(request))) ``` why are only these quotes translated to '#39;' and all other special characters not?

Original source