修正后台->设置->评论->允许使用的html标签里的重复编码问题
This commit is contained in:
祁宁 2014-04-08 22:43:32 +08:00
parent ea3d5585a8
commit 23b87aeb1f
2 changed files with 15 additions and 3 deletions

View File

@ -192,7 +192,21 @@ list($prefixVersion, $suffixVersion) = explode('/', $currentVersion);
<p class="message error"><?php _e('您没有上传 config.inc.php 文件,请您重新安装!'); ?> <button class="btn primary" type="submit"><?php _e('重新安装 &raquo;'); ?></button></p>
</form>
</div>
<?php elseif (!Typecho_Cookie::get('__typecho_config')): ?>
<h1 class="typecho-install-title"><?php _e('没有安装!'); ?></h1>
<div class="typecho-install-body">
<form method="post" action="?config" name="config">
<p class="message error"><?php _e('您没有执行安装步骤,请您重新安装!'); ?> <button class="btn primary" type="submit"><?php _e('重新安装 &raquo;'); ?></button></p>
</form>
</div>
<?php else : ?>
<?php
$config = unserialize(base64_decode(Typecho_Cookie::get('__typecho_config')));
Typecho_Cookie::delete('__typecho_config');
$db = new Typecho_Db($config['adapter'], $config['prefix']);
$db->addServer($config, Typecho_Db::READ | Typecho_Db::WRITE);
Typecho_Db::set($db);
?>
<h1 class="typecho-install-title"><?php _e('安装成功!'); ?></h1>
<div class="typecho-install-body">
<div class="message success">
@ -349,7 +363,6 @@ list($prefixVersion, $suffixVersion) = explode('/', $currentVersion);
'url' => 'http://www.typecho.org', 'screenName' => $config['userName'], 'group' => 'administrator', 'created' => Typecho_Date::gmtTime())));
unset($_SESSION['typecho']);
Typecho_Cookie::delete('__typecho_config');
header('Location: ./install.php?finish&user=' . urlencode($config['userName'])
. '&password=' . urlencode($password));
} catch (Typecho_Db_Exception $e) {
@ -383,7 +396,6 @@ list($prefixVersion, $suffixVersion) = explode('/', $currentVersion);
//但是要更新用户网站
$installDb->query($installDb->update('table.options')->rows(array('value' => $config['siteUrl']))->where('name = ?', 'siteUrl'));
unset($_SESSION['typecho']);
Typecho_Cookie::delete('__typecho_config');
header('Location: ./install.php?finish&use_old');
exit;
} else {

View File

@ -156,7 +156,7 @@ class Widget_Options_Discussion extends Widget_Abstract_Options implements Widge
/** 允许使用的HTML标签和属性 */
$commentsHTMLTagAllowed = new Typecho_Widget_Helper_Form_Element_Textarea('commentsHTMLTagAllowed', NULL,
htmlspecialchars($this->options->commentsHTMLTagAllowed),
$this->options->commentsHTMLTagAllowed,
_t('允许使用的HTML标签和属性'), _t('默认的用户评论不允许填写任何的HTML标签, 你可以在这里填写允许使用的HTML标签.') . '<br />'
. _t('比如: %s', ': <code>&lt;a href=&quot;&quot;&gt; &lt;img src=&quot;&quot;&gt; &lt;blockquote&gt;</code>'));
$commentsHTMLTagAllowed->input->setAttribute('class', 'mono');