<%
functionth(str)
str=replace(str,"媽的","MD")
str=replace(str,"靠","KAO")
th=str
endfunction
functionencode(str)
str=replace(str,">",">")
str=replace(str,"<","<")
str=Replace(str,CHR(32),"")
str=Replace(str,CHR(13),"")
str=Replace(str,CHR(10)&CHR(10),"</P><P>")
str=Replace(str,CHR(10),"<BR>")
encode=str
endfunction
%>
<%title=request.form("title")
content=request.form("content")%>
文章標題:<%=th(title)%><hr>
文章內容:<%=encode(th(content))%>
th(str)為自定義函數,主要功能很簡單:過濾字符。 encode(str)也為自定義函
數,主要功能是完整地顯示被傳遞的信息。
CHR(10)表示換行,CHR(13)表示回車,CHR(32)表示空格。
附加功能:顯示UBB代碼。
即ubb.asp中含有ubb()函數。
增強的cnbruce.asp
<!--#includefile="http://www.cnbruce.com/blog/ubb.asp"-->
<%
functionth(str)
str=replace(str,"媽的","MD")
str=replace(str,"靠","KAO")
th=str
endfunction
%>