升级后集成tinyMCE编辑器不能使用

解决您在不同平台环境下遇到的安装和升级问题
回复
jacksonwong
帖子: 5
注册时间: 2009年 3月 30日 19:45

升级后集成tinyMCE编辑器不能使用

帖子 jacksonwong »

升级到1.0版本后,qining开发的集成tinyMCE编辑器不能使用。写文章时调入很慢,提交内容时出错,提示是插件的72行$post['text'] = Typecho_Common::removeParagraph($post['text']); 出错。经过对比发现是Common.php这个文件新旧版本有差别。新版本里没有

代码: 全选

/**
     * 去掉html中的分段
     *
     * @access public
     * @param string $html 输入串
     * @return string
     */
    public static function removeParagraph($html)
    {
        /** 锁定标签 */
        $html = self::lockHTML($html);
        $html = str_replace(array("\r", "\n"), '', $html);
   
        $html = trim(preg_replace(
        array("/\s*<p>(.*?)<\/p>\s*/is", "/\s*<br\s*\/>\s*/is",
        "/\s*<(div|blockquote|pre|code|script|table|fieldset|ol|ul|dl|h[1-6])([^>]*)>/is",
        "/<\/(div|blockquote|pre|code|script|table|fieldset|ol|ul|dl|h[1-6])>\s*/is", "/\s*<\!--more-->\s*/is"),
        array("\n\\1\n", "\n", "\n\n<\\1\\2>", "</\\1>\n\n", "\n\n<!--more-->\n\n"),
        $html));
       
        return trim(self::releaseHTML($html));
    }
这个函数。

这个该怎么解决?
回复