账号通
    

账号  

密码  

3308

查看

12

回复
主题:最后一次提出不能发表文章的问题----没人解答就只能是换程序了,诶! [收藏主题] 转到:  
xx086 当前离线

87

主题

0

广播

0

粉丝
添加关注
级别:学前班

用户积分:978 分
登录次数:53 次
注册时间:2007/8/26
最后登录:2007/11/29
xx086 发表于:2007/11/18 14:55:00   | 只看该作者 查看该作者主题 11楼 
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
wwwhome 当前离线

119

主题

0

广播

0

粉丝
添加关注
级别:一年级

用户积分:1220 分
登录次数:54 次
注册时间:2007/10/15
最后登录:2008/2/14
wwwhome 发表于:2007/11/18 12:56:00   | 只看该作者 查看该作者主题 12楼 

下面是那个文件我看不懂你说的问题

----------------------------------------------

Function Resumeblank(ByVal Content)
     if Content="" then
      Resumeblank=Content
      Exit Function
     end if
     Dim strHtml, strHtml2, Num, Numtemp, Strtemp, i
     strHtml = Replace(strHtml, "<SPAN", "<span")
     strHtml = Replace(strHtml, "</SPAN>", "</span>")
     strHtml = Replace(Content, "<DIV", "<div")
     strHtml = Replace(strHtml, "</DIV>", "</div>")
     strHtml = Replace(strHtml, "<OBJECT", "<object")
     strHtml = Replace(strHtml, "</OBJECT>", "</object>")
     strHtml = Replace(strHtml, "<PARAM", "<param")
     strHtml = Replace(strHtml, "</PARAM>", "</param>")
     strHtml = Replace(strHtml, "<P", "<p")
     strHtml = Replace(strHtml, "</P>", "</p>")
     strHtml = Replace(strHtml, "<BR", "<br /")
     strHtml = Replace(strHtml, "<HR", "<hr")
     strHtml = Replace(strHtml, "<STRONG", "<strong")
     strHtml = Replace(strHtml, "</STRONG>", "</strong>")
     strHtml = Replace(strHtml, "<EM", "<em")
     strHtml = Replace(strHtml, "</EM>", "</em>")
     strHtml = Replace(strHtml, "<UL", "<ul")
     strHtml = Replace(strHtml, "</UL>", "</ul>")
     strHtml = Replace(strHtml, "<OL", "<ol")
     strHtml = Replace(strHtml, "</OL>", "</ol>")
     strHtml = Replace(strHtml, "<LI", "<li")
     strHtml = Replace(strHtml, "</LI>", "</li>")
     strHtml = Replace(strHtml, "<U", "<u")
     strHtml = Replace(strHtml, "</U>", "</u>")
     strHtml = Replace(strHtml, "<A", "<a")
     strHtml = Replace(strHtml, "</A>", "</a>")
     strHtml = Replace(strHtml, "<IMG", "<img")
     strHtml = Replace(strHtml,"VALUE=","value=")
     strHtml = Replace(strHtml, "<FONT", "<font")
     strHtml = Replace(strHtml, "</FONT>", "</font>")
     strHtml = Replace(strHtml, "<TABLE", "<table")
     strHtml = Replace(strHtml, "</TABLE>", vbCrLf & "</table>" & vbCrLf)
     strHtml = Replace(strHtml, "<TBODY>", "")
     strHtml = Replace(strHtml, "</TBODY>", "" & vbCrLf)
     strHtml = Replace(strHtml, "<TR", "<tr")
     strHtml = Replace(strHtml, "</TR>", vbCrLf & "</tr>" & vbCrLf)
     strHtml = Replace(strHtml, "<TD", "<td")
     strHtml = Replace(strHtml, "</TD>", "</td>")
     strHtml = Replace(strHtml, "<"&"!--", vbCrLf & "<"&"!--")
     strHtml = Replace(strHtml, "<SELECT", vbCrLf & "<Select")
     strHtml = Replace(strHtml, "</SELECT>", vbCrLf & "</Select>")
     strHtml = Replace(strHtml, "<OPTION", vbCrLf & "  <Option")
     strHtml = Replace(strHtml, "</OPTION>", "</Option>")
     strHtml = Replace(strHtml, "<INPUT", vbCrLf & "  <Input")
     strHtml = Replace(strHtml, "<" & "script", vbCrLf & "<"&"script")
     strHtml = Replace(strHtml, "&amp;", "&")
     strHtml = Replace(strHtml, "{$--", vbCrLf & "<"&"!--$")
     strHtml = Replace(strHtml, "--}", "$--"&">")
     arrContent = Split(strHtml, vbCrLf)
     For i = 0 To UBound(arrContent)
      Numtemp = False
      If InStr(arrContent(i), "<table") > 0 Then
       Numtemp = True
       If Strtemp <> "<table" And Strtemp <> "</table>" Then
        Num = Num + 2
       End If
       Strtemp = "<table"
      ElseIf InStr(arrContent(i), "<tr") > 0 Then
       Numtemp = True
       If Strtemp <> "<tr" And Strtemp <> "</tr>" Then
        Num = Num + 2
       End If
       Strtemp = "<tr"
      ElseIf InStr(arrContent(i), "<td") > 0 Then
       Numtemp = True
       If Strtemp <> "<td" And Strtemp <> "</td>" Then
        Num = Num + 2
       End If
       Strtemp = "<td"
      ElseIf InStr(arrContent(i), "</table>") > 0 Then
       Numtemp = True
       If Strtemp <> "</table>" And Strtemp <> "<table" Then
        Num = Num - 2
       End If
       Strtemp = "</table>"
      ElseIf InStr(arrContent(i), "</tr>") > 0 Then
       Numtemp = True
       If Strtemp <> "</tr>" And Strtemp <> "<tr" Then
        Num = Num - 2
       End If
       Strtemp = "</tr>"
      ElseIf InStr(arrContent(i), "</td>") > 0 Then
       Numtemp = True
       If Strtemp <> "</td>" And Strtemp <> "<td" Then
        Num = Num - 2
       End If
       Strtemp = "</td>"
      ElseIf InStr(arrContent(i), "<"&"!--") > 0 Then
       Numtemp = True
      End If
    
      If Num < 0 Then Num = 0
      If Trim(arrContent(i)) <> "" Then
       If i = 0 Then
        strHtml2 = String(Num, " ") & arrContent(i)
       ElseIf Numtemp = True Then
        strHtml2 = strHtml2 & vbCrLf & String(Num, " ") & arrContent(i)
       Else
        strHtml2 = strHtml2 & vbCrLf & arrContent(i)
       End If
      End If
     Next
   Resumeblank = strHtml2
 End Function
 function FormatHtml(Content)
  Dim regEx, Matches, Match, TempStr
    Set regEx = New RegExp
    regEx.Pattern = "(background=|SIZE=|color=|bgColor=|colSpan=|align=|width=|height=|cellSpacing=|cellPadding=|border=|class=| id=|target=)[^( |)>]*"
    regEx.IgnoreCase = True
    regEx.Global = True
    Set Matches = regEx.Execute(Content)
    For Each Match In Matches
     If Instr(Match.Value,"""")=0 Then
      If Instr(Match.Value,"class=")<>0 then TempStr=Replace(Match.Value,"class=","class=""")&""""
      If Instr(Match.Value,"target=")<>0 then TempStr=Replace(Match.Value,"target=","target=""")&""""
      If Instr(Match.Value," id=")<>0 then TempStr=Replace(Match.Value," id="," id=""")&""""
      If Instr(Match.Value,"border=")<>0 then TempStr=Replace(Match.Value,"border=","border=""")&""""
      If Instr(Match.Value,"cellPadding=")<>0 then TempStr=Replace(Match.Value,"cellPadding=","cellpadding=""")&""""
      If Instr(Match.Value,"cellSpacing=")<>0 then TempStr=Replace(Match.Value,"cellSpacing=","cellspacing=""")&""""
      If Instr(Match.Value,"width=")<>0 and Instr(Match.Value,"%")=0 then  TempStr=Replace(Match.Value,"width=","width=""")&""""
       If Instr(Match.Value,"height=")<>0 and Instr(Match.Value,"%")=0 then  TempStr=Replace(Match.Value,"height=","height=""")&""""
      If Instr(Match.Value,"align=")<>0 then  TempStr=Replace(Match.Value,"align=","align=""")&""""
      If Instr(Match.Value,"colSpan=")<>0 then  TempStr=Replace(Match.Value,"colSpan=","colSpan=""")&""""
      If Instr(Match.Value,"bgColor=")<>0 then  TempStr=Replace(Match.Value,"bgColor=","bgColor=""")&""""
      If Instr(Match.Value,"color=")<>0 then  TempStr=Replace(Match.Value,"color=","color=""")&""""
      If Instr(Match.Value,"SIZE=")<>0 then  TempStr=Replace(Match.Value,"SIZE=","size=""")&""""
      If Instr(Match.Value,"background=")<>0 then  TempStr=Replace(Match.Value,"background=","background=""")&""""
     
      'If Instr(Match.Value,"http-equiv=")<>0 then  TempStr=Replace(Match.Value,"http-equiv=","http-equiv=""")&""""
     ' If Instr(Match.Value,"rel=")<>0 then  TempStr=Replace(Match.Value,"rel=","rel=""")&""""
      'If Instr(Match.Value,"type=")<>0 then  TempStr=Replace(Match.Value,"type=","type=""")&""""
     
      If Instr(Match.value,"%")=0 Then Content=Replace(Content,Match.value,TempStr)
     End If
    Next
    FormatHtml=Content
 End Function
 
 
 function ReplaceScriptToImg(Content)
     Dim regEx,Match, Matches,strTemp
      Set regEx = New RegExp
   regEx.IgnoreCase = True
   regEx.Global = True
      regEx.Pattern = "(\<Script)(.*?)(\<\/Script\>)"
        Set Matches = regEx.Execute(Content)
        For Each Match In Matches
            strTemp = Replace(Match.Value, "<", "[!")
            strTemp = Replace(strTemp, ">", "!]")
            strTemp = Replace(strTemp, "'", "′")
            strTemp = "<IMG alt='#" & strTemp & "#' src=""" &domain&"KS_Editor/images/jscript.gif"" border=0 $>"
            Content = Replace(Content, Match.Value, strTemp)
        Next
  ReplaceScriptToImg=content
  'ReplaceScriptToImg=Replace(content,"""","[")
  End function
  function ReplaceImgToScript(Content)
     Dim regEx,Matches,Match,strTemp2,Match2,strTemp
     Set regEx = New RegExp
   regEx.IgnoreCase = True
   regEx.Global = True
   regEx.Pattern = "\<IMG(.[^\<]*?)\$\>"
   Set Matches = regEx.Execute(Content)
   For Each Match In Matches
   regEx.Pattern = "\#\[(.*?)\]\#"
   Set strTemp = regEx.Execute(Match.Value)
    For Each Match2 In strTemp
     strTemp2 = Replace(Match2.Value, "&amp;", "&")
     strTemp2 = Replace(strTemp2, "#", "")
     strTemp2 = Replace(strTemp2,"&13;&10;",vbCrLf)
     strTemp2 = Replace(strTemp2,"&9;",vbTab)
     strTemp2 = Replace(strTemp2,"′","'")
     strTemp2 = Replace(strTemp2, "[!", "<")
     strTemp2 = Replace(strTemp2, "!]", ">")
     Content = Replace(Content, Match.Value, strTemp2)
    Next
    Next
      Content = Replace(Content, "<HEAD", "<head")
     Content = Replace(Content, "</HEAD>", "</head>")
     Content = Replace(Content, "<TITLE", "<title")
     Content = Replace(Content, "</TITLE>", "</title>")
     Content = Replace(Content, "<liNK", "<link")
     Content = Replace(Content, "><link", ">" & vbcrlf &"<link")
     Content = Replace(Content, "></head", ">" & vbcrlf &"</head")
     Content = Replace(Content, "<META", "<meta")
     Content = Replace(Content, "<BODY", "<body")
     Content = Replace(Content, "</BODY>", "</body>")
     'Content = Replace(Content, "<body contentEditable=true", "<body")
      ReplaceImgToScript= Content
  End function

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
zhenfengdz 当前离线

3821

主题

0

广播

1

粉丝
添加关注
级别:大三

用户积分:21733 分
登录次数:436 次
注册时间:2007/1/9
最后登录:2013/4/24
zhenfengdz 发表于:2007/11/18 6:03:00   | 只看该作者 查看该作者主题 13楼 
KS_Inc下的Editor.vbs是否存在,大小(字节)是不是符合。
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
<上一主题 | 下一主题 >
Powered By KesionCMS Version X1
厦门科汛软件有限公司 © 2006-2016 页面执行1.12891秒 powered by KesionCMS 9.0