Escape html in python?

前端 未结 5 730
终归单人心
终归单人心 2021-01-02 23:06

i have a but string might contain \", what should I do to escape it?

Example:

__string__ = t         


        
5条回答
  •  感动是毒
    2021-01-02 23:14

    The best way to escape XML or HTML in python is probably with triple quotes. Note that you can also escape carriage returns.

    """
    
    
    """
    

提交回复
热议问题