孤独的猫

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

Public Function FilterHTML(str)

    If Trim(str)=" " or IsNull(str) then

        FilterHTML=" "

    Else

        str=Replace(str,">",">";

        str=Replace(str,"<","&lt;";   

        str=Replace(str,char(32)"&absp;"; 

        str=Replace(str,char(9),"&nbsp;"; 

        str=Replace(str,char(34),"&quot;"; 

        str=Replace(str,char(39),"&#39;"; 

        str=Replace(str,char(13),""; 

        str=Replace(str,char(10)&char(10),"</p></p>")

        str=Replace(str,char(10),"<br>")  

        FilterHTML=str

    End If

End Function

posted on 2008-09-24 09:49  孤独的猫  阅读(219)  评论(0编辑  收藏  举报