Python 标准库 —— cgi/html

来源:互联网 发布:小号交易平台源码 编辑:程序博客网 时间:2024/05/22 13:23

cgi:common gateway interface,通用网关接口,CGI是外部应用程序(CGI程序)与Web服务器之间的接口标准,是在CGI程序和Web服务器之间传递信息的规程。

1. escape:替换 html 页面标签& / < />

cgi 中的 escape 接口已被 deprecated

>> html.escape('<h1>hello world</h1>')'&lt;h1&gt;hello world&lt;/h1&gt;'>> html.unescape(html.escape('<h1>hello world</h1>'))'<h1>hello world</h1>'
0 0
原创粉丝点击