以下UBB是在我的页中应用的,但就不能断行,不知道断行代码怎么加进来才可以。
----------------------------
断行代码:
<% =(DoTrimProperly((Rshot.Fields.Item("title").value), 42, 0, 1, "...")) %>---------------------------------------------
以下是UBB代码<%
'下面的这个程序是用来高度显示查询的关键字
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,"