asp html标签转换html编码 <script>ec(2);</script> Function Xszh(zh) if zh<>"" or not isnull(zh) then zh=replace(zh," "," ") zh=replace(zh,"€","'") ''zh=replace(zh,chr(13),"<br>") zh=lcase(zh) zh=replace(zh,"<table","<table") zh=replace(zh,"<hr>","<hr>") zh=replace(zh,"<tr","<tr") zh=replace(zh,"<%","<%") zh=replace(zh,"<html>","<html>") zh=replace(zh,"<body","<body") 'zh=replace(zh,"<div","<div") zh=replace(zh,"<iframe ","<iframe") zh=replace(zh,"</iframe> ","<iframe>") zh=replace(zh,"</html>","</html>") 'zh=replace(zh,"<OBJECT","<object") 'zh=replace(zh,"<object","<object") 'zh=replace(zh,"</div>","</div>") ''zh=replace(zh,"<span","<span") 'zh=replace(zh,"<script","<script") zh=replace(zh,"<td","<td") zh=replace(zh,"</table>","</table>") zh=replace(zh,"<title>","<title>") zh=replace(zh,"</title>","</title>") zh=replace(zh,"</body>","</body>") zh=replace(zh,"<input","<input") zh=replace(zh,"<!doctype","<doctype") zh=replace(zh,"</tr>","</tr>") zh=replace(zh,"</td>","</td>") 'zh=replace(zh,"<img","<img") zh=replace(zh,"[img]","<img border=0 src=") zh=replace(zh,"[/img]",">") zh=replace(zh,"<text","<text") zh=replace(zh,"<java","<java") zh=replace(zh,"<a ","<a target=_blank ") zh=replace(zh,"</javascript>","</javascript>") zh=replace(zh,"[url=","<a target=_blank href=") zh=replace(zh,"[/url]","</a>") xszh = zh end if End Function
|