文件名称:java替换html特殊字符工具类
文件大小:8KB
文件格式:JAVA
更新时间:2017-07-09 15:52:24
替换&字符
替换html中特殊字符 htmlStr =htmlStr.replaceAll("∀", "∀"); htmlStr =htmlStr.replaceAll("∂", "∂"); htmlStr =htmlStr.replaceAll("&exists;", "∃"); htmlStr =htmlStr.replaceAll("∅", "∅"); htmlStr =htmlStr.replaceAll("∇", "∇"); htmlStr =htmlStr.replaceAll("∈", "∈"); htmlStr =htmlStr.replaceAll("∉", "∉"); htmlStr =htmlStr.replaceAll("∋", "∋"); htmlStr =htmlStr.replaceAll("∏", "∏"); htmlStr =htmlStr.replaceAll("∑", "∑"); htmlStr =htmlStr.replaceAll("−", "−"); htmlStr =htmlStr.replaceAll("∗", "∗"); htmlStr =htmlStr.replaceAll("√", "√"); htmlStr =htmlStr.replaceAll("∝", "∝"); htmlStr =htmlStr.replaceAll("∞", "∞"); htmlStr =htmlStr.replaceAll("∠", "∠"); ...... 这些字符全替换,虽然分高点但是工作量很大,从html 帮助文档中挨个提出来