python html转义与反转义

    from xml.sax.saxutils import escape
    from xml.sax.saxutils import quoteattr
    print(escape('a=1&b=2'), quoteattr('a=1&b=2'))

html转义字符对照表[http://tool.oschina.net/commons?type=2]

你可能感兴趣的:(python html转义与反转义)