小编phi*_*phi的帖子

不能使用django的render_to_string对单引号(')进行编码

我有一个django的render_to_string和编码单引号的问题.

... = render_to_string('dummy.txt', {'request':request, 'text':text,}, context_instance=RequestContext(request)))
Run Code Online (Sandbox Code Playgroud)

为什么只有这些引号翻译成'#39;' 和所有其他特殊字符不?

django unicode quotes render-to-string

6
推荐指数
1
解决办法
4685
查看次数

标签 统计

django ×1

quotes ×1

render-to-string ×1

unicode ×1