过滤字符串中的HTML符号
来源:互联网 发布:韩代淘宝知乎 编辑:程序博客网 时间:2024/04/30 04:50
public class StringUtil{
public static String filterHTML(String input){
if (input == null ){
return null;
}
if (input.length() == 0){
return input;
}
input = input.replaceAll("&", "&");
input = input.replaceAll("<", "<");
input = input.replaceAll(">", ">");
input = input.replaceAll(" " , " ");
input = input.replaceAll("'', "'");
input = input.replaceAll("\"", """);
input = input.replaceAll("\n", "<br>");
return input;
}
}
- 过滤字符串中的HTML符号
- 过滤字符串中的HTML字符
- 如何过滤掉字符串中的html代码
- 过滤字符串中的HTML代码(VBScript)
- 过滤掉字符串中的html代码
- 【.net】利用正则表达式过滤字符串中的HTML代码
- 关于使用strip_tag过滤字符串中的html标签
- DEDEcms过滤内容中的html标签, 并且截取字符串
- java使用正则表达式过滤掉字符串中的html标签
- 取出html中的符号
- 过滤字符串中的特殊符号
- 过滤符号
- 过滤xml中的非法字符串
- 过滤字符串中的Emoji表情
- 正则过滤字符串中的数字
- PHP过滤字符串中的空格
- Ruby中的字符串与符号
- Ruby中的字符串与符号
- linux下源码编译 subversion(SVN)- 解决ra_dav模块加载问题(HTTP)
- ASP编程记录--(事务处理)
- weblogic启动:weblogic.application.ModuleException
- arm学习进度跟踪
- Linux下使用I2C总线读写 EEPROM(读写i2c从设备通用程序)
- 过滤字符串中的HTML符号
- 我指间的刺青是对你的誓言
- ping某域名的整个流程
- Linux目录架构详解
- SP 中的错误处理
- Android 根据坐标获取地址
- Linux C程序调用系统命令
- 关于Alipay支付宝接口(Java版)
- 展讯智能机平台8810的编译脚本解析