<%
function th(str)
str=replace(str,"媽的","MD")
str=replace(str,"靠","KAO")
th=str
end function
function encode(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
end function
%>
<%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
<!--#include file="http://www.cnbruce.com/blog/ubb.asp"-->
<%
function th(str)
str=replace(str,"媽的","MD")
str=replace(str,"靠","KAO")
th=str
end function
%> 您可能感興趣的文章:
把textarea中字符串里含有的回車換行替換成<br>的javascript代碼ReplaceTrim 函數之asp實現過濾掉字符中所有的tab和回車和換行的代碼windows 中 /r/n 區別于 類unix中的/n 疑問理解(crlf回車換行)Js 回車換行處理的辦法及replace方法應用oracle中去掉回車換行空格的方法詳解C++讀取到回車換行符問題處理