共计 2742 个字符,预计需要花费 7 分钟才能阅读完成。
提醒:本文最后更新于2017-03-23 09:38,文中所关联的信息可能已发生改变,请知悉!
如题,pjblog352版本ubb编辑器下code插入代码无法正常显示,HTML标签会被解析。临时解决方法如下:(反正目前这个问题牵涉比较多,自己暂时就这样折中修改了)
编辑common/function.asp文件,查找如下函数代码:
Function UnCheckStr(ByVal Str) | |
If IsNull(Str) Then | |
UnCheckStr = "" | |
Exit Function | |
End If | |
Str = Replace(Str, "'", "'") | |
Str = Replace(Str, """, """") | |
Str = Replace(Str, "<", "<") | |
Str = Replace(Str, ">", ">") | |
Dim re | |
Set re = New RegExp | |
re.IgnoreCase = True | |
re.Global = True | |
re.Pattern = "(w)(here)" | |
Str = re.Replace(Str, "$1here") | |
re.Pattern = "(s)(elect)" | |
Str = re.Replace(Str, "$1elect") | |
re.Pattern = "(i)(nsert)" | |
Str = re.Replace(Str, "$1nsert") | |
re.Pattern = "(c)(reate)" | |
Str = re.Replace(Str, "$1reate") | |
re.Pattern = "(d)(rop)" | |
Str = re.Replace(Str, "$1rop") | |
re.Pattern = "(a)(lter)" | |
Str = re.Replace(Str, "$1lter") | |
re.Pattern = "(d)(elete)" | |
Str = re.Replace(Str, "$1elete") | |
re.Pattern = "(u)(pdate)" | |
Str = re.Replace(Str, "$1pdate") | |
re.Pattern = "(s)(or)" | |
Str = re.Replace(Str, "$1or") | |
Set re = Nothing | |
Str = Replace(Str, "&", "&") | |
UnCheckStr = Str | |
End Function | |
</code> | |
在其下面添加如下函数代码: | |
<code> | |
Function UnCheckStr0(ByVal Str) | |
If IsNull(Str) Then | |
UnCheckStr0 = "" | |
Exit Function | |
End If | |
Str = Replace(Str, "'", "'") | |
Str = Replace(Str, """, """") | |
Dim re | |
Set re = New RegExp | |
re.IgnoreCase = True | |
re.Global = True | |
re.Pattern = "(w)(here)" | |
Str = re.Replace(Str, "$1here") | |
re.Pattern = "(s)(elect)" | |
Str = re.Replace(Str, "$1elect") | |
re.Pattern = "(i)(nsert)" | |
Str = re.Replace(Str, "$1nsert") | |
re.Pattern = "(c)(reate)" | |
Str = re.Replace(Str, "$1reate") | |
re.Pattern = "(d)(rop)" | |
Str = re.Replace(Str, "$1rop") | |
re.Pattern = "(a)(lter)" | |
Str = re.Replace(Str, "$1lter") | |
re.Pattern = "(d)(elete)" | |
Str = re.Replace(Str, "$1elete") | |
re.Pattern = "(u)(pdate)" | |
Str = re.Replace(Str, "$1pdate") | |
re.Pattern = "(s)(or)" | |
Str = re.Replace(Str, "$1or") | |
Set re = Nothing | |
Str = Replace(Str, "&", "&") | |
UnCheckStr0 = Str | |
End Function | |
编辑文件class/cls_logAction.asp 查找以下代码:
查找如下代码:
Temp1 = Replace(Temp1, "<$ArticleContent$>", UnCheckStr(UBBCode(HtmlEncode(log_View("log_Content")), Mid(log_View("log_ubbFlags"), 1, 1), Mid(log_View("log_ubbFlags"), 2, 1), Mid(log_View("log_ubbFlags"), 3, 1), Mid(log_View("log_ubbFlags"), 4, 1), Mid(log_View("log_ubbFlags"), 5, 1))))
修改为如下代码:(有两处)
Temp1 = Replace(Temp1, "<$ArticleContent$>", UnCheckStr0(UBBCode(HtmlEncode(log_View("log_Content")), Mid(log_View("log_ubbFlags"), 1, 1), Mid(log_View("log_ubbFlags"), 2, 1), Mid(log_View("log_ubbFlags"), 3, 1), Mid(log_View("log_ubbFlags"), 4, 1), Mid(log_View("log_ubbFlags"), 5, 1))))
查找:
Temp2 = Replace(Temp2, "<$log_Intro$>", UnCheckStr(UBBCode(log_View("log_Intro"), Mid(log_View("log_ubbFlags"), 1, 1), Mid(log_View("log_ubbFlags"), 2, 1), Mid(log_View("log_ubbFlags"), 3, 1), Mid(log_View("log_ubbFlags"), 4, 1), Mid(log_View("log_ubbFlags"), 5, 1))))
修改为:
Temp2 = Replace(Temp2, "<$log_Intro$>", UnCheckStr0(UBBCode(log_View("log_Intro"), Mid(log_View("log_ubbFlags"), 1, 1), Mid(log_View("log_ubbFlags"), 2, 1), Mid(log_View("log_ubbFlags"), 3, 1), Mid(log_View("log_ubbFlags"), 4, 1), Mid(log_View("log_ubbFlags"), 5, 1))))
在文件common/class.asp查找:
UnCheckStr
修改为:
UnCheckStr0
保存上传文件,后台更新缓存,静态重新生成
正文完