What are all the HTML escaping contexts?

后端 未结 5 1165
予麋鹿
予麋鹿 2021-02-09 03:45

When outputting HTML, there are several different places where text can be interpreted as control characters rather than as text literals. For example, in \"regular\" text (tha

5条回答
  •  半阙折子戏
    2021-02-09 04:19

    If you are this concerned about the validity of the final HTML, you might consider constructing the HTML via a DOM, versus as text.

    You don't say what environment you are targeting.

提交回复
热议问题