function heBing_shuXin(str)
if str="" then
heBing_shuXin=""
exit function
end if
str=nbsp_hid(str)
dim s,arr,i,str1,tagLen,strLen
s="onclick,onblur,ondblclick,onkeydown,onmousedown,onfocus,onmouseup,onmousemove,onkeyup"
arr=split(s,",")
for i=0 to ubound(arr)
str1=replace(str,arr(i),"")
strLen=len(str1)
tagLen=len(arr(i))
if strLen<>len(str) and len(str)-strLen>tagLen then
str=heBing_shuXin_sub(str,arr(i))
end if
next
str=nbsp_show(str)
heBing_shuXin=str
end function
function  heBing_shuXin_sub(str,tag)
Dim re,sub_a,new_sub_a
Set re = New RegExp
re.IgnoreCase= True 
re.Global	 = True
re.Pattern = tag+"[ ]*=[ ]*([^\n]+?)[ >]"
Set arr  = re.Execute(str)
str=re.replace(str,"")
dim new_str
new_str=" "+tag+"="+chr(34)
For Each Match_a_asp in arr
sub_a=match_a_asp.value
sub_a=heBing_shuXin_del_duoYu(tag,sub_a)
new_str=new_str&sub_a&";"
Next
str=replace(str,">",new_str+chr(34)+">")
heBing_shuXin_sub=str
end function
function  heBing_shuXin_del_duoYu(tag,s)
dim re
Set re = New RegExp
re.IgnoreCase= True 
re.Pattern = tag+"[ ]*=[ ]*([\w\W]+?)"
s=re.replace(s,"$1")
s=trim(s)
if (left(s,1)="'" and right(s,1)="'") or(left(s,1)="""" and right(s,1)="""") then
s=mid(s,2,len(s)-2)
end if
s=replace(s,"""",chr(92)+"""")
heBing_shuXin_del_duoYu=s
end function
function nbsp_hid(s)
dim i,a,old,yinHao_left,new_str
for i=1 to len(s)
a=mid(s,i,1)
if yinHao_left="y" then
if(a=" ") then
a="&#nbsp;"
elseif a=">" then
a="&#right_kuoHao;"
end if
end if 
new_str=new_str&a
if a=chr(34) and old<>chr(92) then
if(yinHao_left="") then
yinHao_left="y"
else
yinHao_left=""
end if
end if
old=a
next
nbsp_hid=new_str
end function
function nbsp_show(s)
s=replace(s,"&#nbsp;"," ")
s=replace(s,"&#right_kuoHao;",">")
nbsp_show=s
end function