管理杂谈OA答疑ERP答疑教程搜索

asp之Html2Ubb函数


function html2ubb(str)

 if str<>"" and not isnull(str) then

 dim re

 set re=new regexp

 re.ignorecase =true

 re.global=true

 re.pattern="(on(load|click|dbclick|mouseover|mouseout|mousedown|mouseup|mousewheel|keydown|submit|change|focus)=""[^""]+"")"

 str = re.replace(str, "")

 re.pattern="((name|id|class)=""[^""]+"")"

 str = re.replace(str, "")

 re.pattern = "(]*?>([\w\w]*?)<\/s+cript>)"

 str = re.replace(str, "")

 re.pattern = "(]*?>([\w\w]*?)<\/iframe>)"

 str = re.replace(str, "")

 re.pattern = "(

 <\/p>)"

 str = re.replace(str, "")

 're.pattern = "<(\w*) class\s*=\s*([^>|\s]*)([^>]*)>"

 'str = re.replace(str,"<$1$3>")

 set re=nothing

 html2ubb = str

 else

 html2ubb = ""

 end if

end function


更多精彩文章浏览...
点击右上角图标分享到朋友圈
官方网站:http://www.clicksun.cn
咨询热线:400-186-1886
服务邮箱:service@clicksun.cn