修改eWebEditor编辑器,让其支持IE6.IE7.IE8等浏览器的方法

    习惯使用eWebEditor作为网站的编辑器。虽然eWebEditor存在很多不足,但仍然放弃不了。现在游览器不断升级,有不少用户已经使用eWebEditor。而eWebEditor在IE7、IE8、FF下有些不正常,主要表现在点击工具栏无效,很纠结呀。
    在网上找来下面的修改方法:
    1、找到下面代码
    if (element.YUSERONCLICK) eval(element.YUSERONCLICK + "anonymous()");
    修改为
    if(navigator.appVersion.match(/8./i)=='8.' || navigator.appVersion.match(/7./i)=='7.' || navigator.appVersion.match(/MAXTHON/i)=='MAXTHON')
    {
    if (element.YUSERONCLICK) eval(element.YUSERONCLICK + "onclick(event)");
    }
    else
    {
    if (element.YUSERONCLICK) eval(element.YUSERONCLICK + "anonymous()");
    }

    另外,eWebEditor的安全性也不怎的。主要是Upload.asp的上传过滤不全。

    在Upload.asp文件里面,找到这句话sAllowExt = Replace(UCase(sAllowExt), "ASP", "")

    把这句话替换为
    Do While InStr(sAllowExt, "ASP") or InStr(sAllowExt, "CER") or InStr(sAllowExt, "ASA") or InStr(sAllowExt, "CDX") or InStr(sAllowExt, "HTR")
    sAllowExt = Replace(sAllowExt, "ASP", "")
    sAllowExt = Replace(sAllowExt, "CER", "")
    sAllowExt = Replace(sAllowExt, "ASA", "")
    sAllowExt = Replace(sAllowExt, "CDX", "")
    sAllowExt = Replace(sAllowExt, "HTR", "")
    sAllowExt = Replace(sAllowExt, "CGI", "")
    sAllowExt = Replace(sAllowExt, "ASPX", "")'
    sAllowExt = Replace(sAllowExt, "ASP .JPG", "")
    sAllowExt = Replace(sAllowExt, "CER .JPG", "")
    sAllowExt = Replace(sAllowExt, "ASA .JPG", "")
    sAllowExt = Replace(sAllowExt, "CDX .JPG", "")
    sAllowExt = Replace(sAllowExt, "HTR .JPG", "")
    sAllowExt = Replace(sAllowExt, "CGI .JPG", "")
    sAllowExt = Replace(sAllowExt, "ASPX .JPG", "")
    Loop

相关文章
tsov.net加入了WIN7的JumpList和IE9的Pinned Sites的支持Internet explorer 9的界面很找骂不喜欢IE9的界面布局chrome是我的最常用的浏览器Chrome Frame可令IE8提速9.6倍IE6的Image toolbar[转载]IE中伪类:hover的使用及BUG在IE下拖动滚动条时border消失的解决方法KAIWO网站后台改用eWebEditor编辑器
    标签:IEEWebEditor 发布于:2010-01-09 13:58:48

当前共有0条评论,我也要发表:

    我的名字:

    我的邮箱: