escape problem in django templates

前端 未结 3 1229
挽巷
挽巷 2021-02-08 15:27

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

3条回答
  •  南笙
    南笙 (楼主)
    2021-02-08 15:37

    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
    <
    /
    >
    

提交回复
热议问题