<%
'限制祈愿内容长度10自动换行函数
function repcontent(main)
dim temp,result,i,endstr
temp=main
i=1
result=""
endstr=""
if len(main) > 50 then
temp=left(main,50)
endstr="........"
end if
if len(temp) > 10 then
  do while len(temp) > 10 and i <= 5
  result=result&left(temp,10)&"<br>"
  temp=mid(temp,11)
  i=i+1
  loop
if len(temp) > 7 then
temp=mid(temp,1,7)
end if
end if
result=result&temp&endstr
repcontent=result
end function
%>
<%
'替换换行符的过滤函数
Function rep(content)
rep=replace(content,vbCrLf,"<br>")
end Function
%>
<%
'替换html字符
Function ReplaceBadChar(strChar)
    If strChar = "" Then
        ReplaceBadChar = ""
    Else
        ReplaceBadChar = Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(strChar, "'", ""), "*", ""), "%", ""), "(",""), ")", ""), "<", ""), ">", ""),"/",""),"{",""),"}","")
    End If
End Function
%>