数据库字段内容存在'、"、>、<等特殊字符,转义html字符输出
来源:互联网 发布:java redis集群客户端 编辑:程序博客网 时间:2024/06/07 06:29
GuestBook_Content=<span style='font: 14px/24px arial, 宋体, sans-serif, tahoma, "Microsoft YaHei"; color: rgb(69, 69, 69); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;'>“你好”这个词是在面对普通人,普通朋友 ,或者同学等一些关系比较普通的人所使用的语气词;</span>
//替换特殊字符
function HTMLEncodes(fString)if not isnull(fString) thenfString = Replace(fString, ">", ">")fString = Replace(fString, "<", "<")fString = Replace(fString, """, CHR(34))fString = Replace(fString, "'", CHR(34)) fString = Replace(fString, " ", CHR(32)&CHR(32)) fString = Replace(fString, " ", CHR(32))fString = Replace(fString, "<br>", CHR(10)) fString = Replace(fString, "", CHR(13)) HTMLEncodes = fStringend ifend function
response.Write HTMLEncodes(ZXFD_GuestBook_Content)
<span style='font: 14px/24px arial, 宋体, sans-serif, tahoma, "Microsoft YaHei"; color: rgb(69, 69, 69); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;'>“你好”这个词是在面对普通人,普通朋友 ,或者同学等一些关系比较普通的人所使用的语气词;</span>
0 0
- 数据库字段内容存在'、"、>、<等特殊字符,转义html字符输出
-  |"|&|<|>等html字符转义
-  |"|&|<|>等html字符转义
-  |"|&|<|>等html字符转义
-  |"|&|<|>等html字符转义
-  |"|&|<|>等html字符转义
-  |"|&|<|>等html字符转义
-  |"|&|<|>等html字符转义
-  |"|&|<|>等html字符转义
-  |"|&|<|>等html字符转义
-  |"|&|<|>等html字符转义
-  |"|&|<|>等html字符转义
-  |"|&|<|>等html字符转义
-  |"|&|<|>等html字符转义
-  |"|&|<|>等html字符转义
- " &< > 等html字符转义
-  |"|&|<|>等html字符转义
-  |"|&|<|>等html字符转义
- C++ Lists(链表)
- 堆栈操作合法性
- Arrayadapter
- 7.35
- LeetCode——029
- 数据库字段内容存在'、"、>、<等特殊字符,转义html字符输出
- python3.4连接和读取oracle数据表
- Java总结
- C++ Queues(队列)
- java泛型II-泛型中存在的约束与局限性
- Android手机计步器中加速度传感器熄屏时的侦听
- 【BZOJ 1726】【Usaco 2006 Nov】Roadblocks 次短路
- flask+pycharm安装虚拟环境中的库文件
- Codeforces RoundC. Ryouko's Memory Note