PJBlog3 V3.2.8.352版本ubb编辑器下code插入代码无法正常显示的解决方法
作者:随然 日期:2010-03-07
pjhome.net" target="_blank">pjhome.net" target="_blank">PJBlog3 V3.2.8.352版本CODE执行BUG及查看更多连接的修改
没想到pjhome.net" target="_blank">pjhome.net" target="_blank">PJBlog 也会出现这么大的BUG,一直就觉得奇怪,官方开发了最新版的3.2为何官方博客都一直没有更新到最新版还是用的3.1呢,看来最新版确实有不少BUG 。
开始自己也没发现,最近查看博客的时候发现以前的代码全部显示不出来了才知道问题有点大了。在网上查到解决办法。
临时的解决办法,注意修改前做好备份。
需要修改到三个文件 cls_logAction.asp function.asp cls_article.asp
编辑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
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
在上面的代码下面添加以下函数代码:
复制内容到剪贴板 程序代码
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
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))))
编辑class/cls_article.asp
查找 UnCheckStr ,修改为 UnCheckStr0 共两处。
"查看更多"连接不对的修改方法:
打开cls_logAction.asp,找到(有两处)
复制内容到剪贴板 程序代码
Temp2 = Replace(Temp2, "<$log_readMore$>", "<p><a href=""article/"&LogID&".htm"" class=""more"">查看更多...</a></p>")
修改成:
复制内容到剪贴板 程序代码
Temp2 = Replace(Temp2, "<$log_readMore$>", "<p><a href="&caload(LogID)&" class=""more"">查看更多...</a></p>")
修改完毕后上传者三个文件,到后台基本设置里面清理服务器缓存。
[本日志由 随然 于 2010-03-07 10:36 PM 编辑]
上一篇: 国内目前封网形势下一篇: 万恶的德阳万兴魅力城三期 湖景湾 施工队
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags: 网站 ASP 漏洞
相关日志:
评论: 0 | 引用: 0 | 查看次数: 13822
发表评论