我用了它,但没有空格和回车,其它的功能都不少,也不错。
------------------------------------------------------
<%
'下面的这个程序是用来高度显示查询的关键字
keyword=request("keyword")
function hightlight(text)
if keyword<>"" and text<>"" then
thekey="
"&keyword&""
text=replace(text,keyword,thekey)
end if
response.write text
end function
%>
<%
'UBB html判断开始
function ChkBadWords(fString)
if fString<>"" then
bwords = split(BadWords, "|")
for i = 0 to ubound(bwords)
fString = Replace(fString, bwords(i), string(len(bwords(i)),"*"))
next
end if
ChkBadWords = fString
end function
function HTMLEncode(fString)
if fString<>"" then
fString = replace(fString, ">", ">")
fString = replace(fString, "<", "<")
fString = Replace(fString, CHR(13), "")
fString = Replace(fString, CHR(10) & CHR(10), "
")
fString = Replace(fString, CHR(10), "
")
end if
HTMLEncode = fString
end function
function HTMLDecode(fString)
if fString<>"" then
fString = replace(fString, ">", ">")
fString = replace(fString, "<", "<")
fString = Replace(fString, "", CHR(13))
fString = Replace(fString, "
", CHR(10) & CHR(10))
fString = Replace(fString, "
", CHR(10))
end if
HTMLDecode = fString
end function
function HTMLDecode1(fString)
if fString<>"" then
fString = replace(fString, ">", ">")
fString = replace(fString, "<", "<")
fString = Replace(fString, "", CHR(13))
fString = Replace(fString, "
", CHR(10) & CHR(10))
fString = Replace(fString, "
", CHR(10))
end if
HTMLDecode1 = fString
end function
function UBBCode(strContent)
dim re
Set re=new RegExp
re.IgnoreCase =true
re.Global=True
' if strIMGInPosts = "1" then
re.Pattern="(\[IMG\])(.[^\[]*)(\[\/IMG\])"
strContent=re.Replace(strContent,"
screen.width-333)this.width=screen.width-333"">")
' end if
re.Pattern="\[DIR=*([0-9]*),*([0-9]*)\](.[^\[]*)\[\/DIR]"
strContent=re.Replace(strContent,"")
re.Pattern="\[QT=*([0-9]*),*([0-9]*)\](.[^\[]*)\[\/QT]"
strContent=re.Replace(strContent,"
")
re.Pattern="(\[code\])(.[^\[]*)(\[\/code\])"
strContent=re.Replace(strContent,"
")
re.Pattern="(\[color=(.[^\[]*)\])(.[^\[]*)(\[\/color\])"
strContent=re.Replace(strContent,"
$3")
re.Pattern="(\[face=(.[^\[]*)\])(.[^\[]*)(\[\/face\])"
strContent=re.Replace(strContent,"
$3")
re.Pattern="(\[align=(.[^\[]*)\])(.*)(\[\/align\])"
strContent=re.Replace(strContent,"
$3
")
re.Pattern="(\[QUOTE\])(.*)(\[\/QUOTE\])"
strContent=re.Replace(strContent,"
")
re.Pattern="(\[fly\])(.*)(\[\/fly\])"
strContent=re.Replace(strContent,"
")
re.Pattern="(\[move\])(.*)(\[\/move\])"
strContent=re.Replace(strContent,"
")
re.Pattern="\[GLOW=*([0-9]*),*(#*[a-z0-9]*),*([0-9]*)\](.[^\[]*)\[\/GLOW]"
strContent=re.Replace(strContent,"$4
")
re.Pattern="\[SHADOW=*([0-9]*),*(#*[a-z0-9]*),*([0-9]*)\](.[^\[]*)\[\/SHADOW]"
strContent=re.Replace(strContent,"$4
")
re.Pattern="(\[i\])(.[^\[]*)(\[\/i\])"
strContent=re.Replace(strContent,"
$2")
re.Pattern="(\[u\])(.[^\[]*)(\[\/u\])"
strContent=re.Replace(strContent,"
$2")
re.Pattern="(\[b\])(.[^\[]*)(\[\/b\])"
strContent=re.Replace(strContent,"
$2")
re.Pattern="(\[fly\])(.[^\[]*)(\[\/fly\])"
strContent=re.Replace(strContent,"
")
re.Pattern="(\[size=1\])(.[^\[]*)(\[\/size\])"
strContent=re.Replace(strContent,"
$2")
re.Pattern="(\[size=2\])(.[^\[]*)(\[\/size\])"
strContent=re.Replace(strContent,"
$2")
re.Pattern="(\[size=3\])(.[^\[]*)(\[\/size\])"
strContent=re.Replace(strContent,"
$2")
re.Pattern="(\[size=4\])(.[^\[]*)(\[\/size\])"
strContent=re.Replace(strContent,"
$2")
re.Pattern="(\[center\])(.[^\[]*)(\[\/center\])"
strContent=re.Replace(strContent,"
$2")
' end if
strContent=ChkBadWords(strContent)
set re=Nothing
UBBCode=strContent
end function
%>