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]
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转义与反转义
本文链接:https://www.haomeiwen.com/subject/ltmkzqtx.html
网友评论