# ESCAPE
对指定类型的内容进行转义编码。解码使用UNESCAPE函数。
# 语法
ESCAPE(content, contentType)
- content:要编码的内容
- contentType:指定内容的类型,支持四种内容类型html 、js 、html-attr
示例地址: ESCAPE (opens new window)
# 示例
ESCAPE('<script>alert("XSS")</script>', 'html');
转义html,返回字符串<script>alert("XSS")</script>
ESCAPE('Image "Logo"', 'html-attr');
转义html属性,返回字符串Image "Logo"
是否有帮助?
0条评论
评论