在使用字符串截取时,只过滤掉了<>,内容并没过滤掉。
例如:
1 |
{ $StrCut(|cutStr_s|{$List.ViewContent$}|cutStr_e|,100)$} |
出来是pstrong关键词位置、密度、处理/strong/pol liURL中出现关键词(英文)/li li网页标题中出现关键词(1-3个)/li li关键词标签中出现关键词(1-3个)/li
此bug修复方法如下:
打开文件 class/Cls_Template.asp
将1565-1582行代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
Private Function t_RemoveHTML(strHTML) Dim objRegExp, Match, Matches Set objRegExp = New Regexp objRegExp.IgnoreCase = True objRegExp.Global = True objRegExp.Pattern = "<.+?>" Set Matches = objRegExp.Execute(strHTML) For Each Match in Matches strHtml=Replace(strHTML,Match.Value, "" ) Next objRegExp.Pattern = "\&.+?;" Set Matches = objRegExp.Execute(strHTML) For Each Match in Matches strHtml=Replace(strHTML,Match.Value, "" ) Next t_RemoveHTML=strHTML Set objRegExp = Nothing End Function |
替换为以下代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
Private Function t_RemoveHTML(strHTML) Dim objRegExp, Match, Matches Set objRegExp = New Regexp objRegExp.IgnoreCase = True objRegExp.Global = True objRegExp.Pattern = "<.+?>" Set Matches = objRegExp.Execute(strHTML) For Each Match in Matches strHtml=Replace(strHTML,Match.Value, "" ) Next objRegExp.Pattern = "<.+?>" Set Matches = objRegExp.Execute(strHTML) For Each Match in Matches strHtml=Replace(strHTML,Match.Value, "" ) Next objRegExp.Pattern = "\&.+?;" Set Matches = objRegExp.Execute(strHTML) For Each Match in Matches strHtml=Replace(strHTML,Match.Value, "" ) Next t_RemoveHTML=strHTML Set objRegExp = Nothing End Function |
保存文件,修复完成。