diff --git a/src/admin/ai_dialog.php b/src/admin/ai_dialog.php
index 60842fb8..a69e5112 100644
--- a/src/admin/ai_dialog.php
+++ b/src/admin/ai_dialog.php
@@ -63,9 +63,7 @@ if (!empty($noeditor)) {
                         ?>
                     </select>
                 </div>
-                <div class="form-group">
-                    <button type="button" id="btnAIAction" class="btn btn-success btn-sm">确定</button>
-                </div>
+                <button type="button" id="btnAIAction" class="btn btn-success btn-sm">确定</button>
             </div>
         </div>
         <script>
diff --git a/src/apps/diy.php b/src/apps/diy.php
index 63ecf5b6..380b7158 100755
--- a/src/apps/diy.php
+++ b/src/apps/diy.php
@@ -66,7 +66,7 @@ if ($action == 'post') {
                 }
             }
         }
-        //判断$name是否输入中文包括繁体则提交失败,$name改成您表单字段标识,恢复注释代码使用
+        //判断$name是否输入违禁词,在后台-系统设置:禁用关键词添加,$name改成您表单字段标识,恢复注释代码使用
         /*if ($name != '' && preg_match("#".$cfg_notallowstr."#i", $name)) {
             ShowMsg("您输入的信息存在违禁,请重新填写", "-1");
             exit();
@@ -98,6 +98,8 @@ if ($action == 'post') {
                 require_once(DEDEINC.'/libraries/mail.class.php');
                 $smtp = new smtp($cfg_smtp_server, $cfg_smtp_port, true, $cfg_smtp_usermail, $cfg_smtp_password);
                 $smtp->debug = false;
+                //除了cfg_adminemail接收邮件外,自定义发送其他指定邮件,恢复注释代码使用
+                //$cfg_smtp_usermail2 = "admin@qq.com";
                 $smtp->sendmail($cfg_adminemail, $cfg_webname, $cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype);
             } else {
                 @mail($cfg_adminemail, $mailtitle, $mailbody, $headers);
diff --git a/src/apps/search.php b/src/apps/search.php
index 4bb81ac9..eac84fbd 100755
--- a/src/apps/search.php
+++ b/src/apps/search.php
@@ -56,6 +56,7 @@ if (empty($typeid)) {
 $typeid = intval($typeid);
 $keyword = addslashes(cn_substr($keyword, 30));
 $typeid = intval($typeid);
+//判断关键词是否输入违禁词,在后台-系统设置:禁用关键词添加
 if ($keyword != '' && ($cfg_notallowstr != '' && preg_match("#".$cfg_notallowstr."#i", $keyword))) {
     ShowMsg("您输入的关键词存在违禁,请重新填写", "-1");
     exit();
diff --git a/src/system/dedealert.func.php b/src/system/dedealert.func.php
index a686cf1f..dcd82f68 100644
--- a/src/system/dedealert.func.php
+++ b/src/system/dedealert.func.php
@@ -17,7 +17,7 @@ define('ALERT_WARNING', 5);
 define('ALERT_INFO', 6);
 define('ALERT_LIGHT', 7);
 define('ALERT_DARK', 8);
-define("ALERT_TPL", '<div style="position:relative;padding:0.75rem 1.25rem;margin-bottom:1rem;width:auto;font-size:14px;color:~color~;background:~background~;border-color:~border~;border:1px solid transparent;border-radius:0.5rem">~content~</div>');
+define("ALERT_TPL", '<div style="padding:1rem"><div style="position:relative;padding:0.75rem 1.25rem;font-size:14px;color:~color~;background:~background~;border-color:~border~;border:1px solid transparent;border-radius:0.5rem">~content~</div></div>');
 //$content:文档,$type:alert类型
 function DedeAlert($content, $type = ALERT_PRIMARY, $isHTML = false)
 {
diff --git a/src/system/extend.func.php b/src/system/extend.func.php
index 57053ca0..ff7b2c03 100755
--- a/src/system/extend.func.php
+++ b/src/system/extend.func.php
@@ -22,21 +22,23 @@ if (!function_exists('obtaintheme')) {
     }
 }
 //标签调用[field:id function='obtaintags(@me,3)'/]3表示调用文档3个标签
-if (!function_exists('obtaintags')) {
-    function obtaintags($aid, $num = 3)
-    {
-        global $dsql, $cfg_cmspath;
-        $tags = '';
-        $query = "SELECT * FROM `#@__taglist` WHERE aid='$aid' LIMIT $num";
-        $dsql->Execute('tag', $query);
-        while($row = $dsql->GetArray('tag')) {
+function obtaintags($aid, $num = 3)
+{
+    global $dsql, $cfg_cmspath, $cfg_rewrite;
+    $tags = '';
+    $query = "SELECT * FROM `#@__taglist` WHERE aid='$aid' LIMIT $num";
+    $dsql->Execute('tag', $query);
+    while ($row = $dsql->GetArray('tag')) {
+        if ($cfg_rewrite == 'Y') {
+            $link = $cfg_cmspath."/tags/{$row['tid']}";
+        } else {
             $link = $cfg_cmspath."/apps/tags.php?/{$row['tid']}";
-            $tags .= ($tags == '' ? "<a href='{$link}'>{$row['tag']}</a>" : "、<a href='{$link}'>{$row['tag']}</a>");
         }
-        return $tags;
+        $tags .= ($tags == '' ? "<a href=\"{$link}\">{$row['tag']}</a>" : "、<a href=\"{$link}\">{$row['tag']}</a>");
     }
+    return $tags;
 }
-//提取文档多图片[field:body function='obtainimgs(@me,3)'/]3表示调用文档3张图片,则附加字段需添加body字段调用channelid='模型id' addfields='字段1,字段2'
+//提取文档多图片[field:body function='obtainimgs(@me,3)'/]3表示调用文档3张图片,例如:文档模型body字段,列表附加字段添加body,dede:arclist标签调用添加channelid='1' addfields='body'
 if (!function_exists('obtainimgs')) {
     function obtainimgs($string, $num)
     {
@@ -44,10 +46,10 @@ if (!function_exists('obtainimgs')) {
         $imgsrc_arr = array_unique($matches[3]);
         $i = 0;
         $result = '';
-        foreach($imgsrc_arr as $imgsrc)
+        foreach ($imgsrc_arr as $imgsrc)
         {
             if ($i == $num) break;
-            $result .= "<img src=\"$imgsrc\">";
+            $result .= "<img src=\"{$imgsrc}\">";
             $i++;
         }
         return $result;
@@ -65,10 +67,11 @@ function obtainalt($newalt)
     //去掉图片宽度和高度
     $newalt = preg_replace("/style=\"width\:(.*)\"/", "", $newalt);
     //去掉结尾
+    $newalt = str_ireplace("  ", " ", $newalt);
     $newalt = str_ireplace(" /", "", $newalt);
     return $newalt;
 }
-//联动单筛选{dede:php}obtainfilter(模型id,类型,'字段1,字段2');{/dede:php}类型表示前台展现方式对应case值
+//联动单筛选{dede:php}obtainfilter(模型id,类型,'字段1,字段2');{/dede:php}类型表示前台展现方式,对应case值,例如:文档模型style字段radio选项卡类型,列表附加字段类别添加style,标签调用{dede:php}obtainfilter(1,1,'style');{/dede:php}
 function obtainfilter($channelid, $type = 1, $fieldsnamef = '', $defaulttid = 0, $toptid = 0, $loadtype = 'autofield')
 {
     global $tid, $dsql, $id, $aid;
diff --git a/src/system/helpers/code.helper.php b/src/system/helpers/code.helper.php
index 61f77f9b..1414e96c 100644
--- a/src/system/helpers/code.helper.php
+++ b/src/system/helpers/code.helper.php
@@ -437,8 +437,8 @@ function checkCode($code)
 function htmlErrors($errors = null)
 {
     if ($errors) {
-        $errorsHTML = "<div style='width:98%;margin:1rem auto;color:#842029;background:#f8d7da;border-color:#842029;position:relative;padding:0.75rem 1.25rem;border:1px solid transparent;border-radius:0.5rem'>";
-        $errorsHTML .= '内嵌脚本缺失,请添加该函数:';
+        $errorsHTML = "<div style='padding:1rem'><div style='position:relative;padding:0.75rem 1.25rem;font-size:14px;color:#842029;background:#f8d7da;border-color:#842029;border:1px solid transparent;border-radius:0.5rem'>";
+        $errorsHTML .= '<p>内嵌脚本缺失,请添加该函数:</p>';
         $errorsHTML .= '<dl>';
         foreach ($errors as $error) {
             if ($error['line']) {
@@ -447,7 +447,7 @@ function htmlErrors($errors = null)
             $errorsHTML .= '<dd>'.$error['name'].'</dd>';
         }
         $errorsHTML .= '</dl>';
-        $errorsHTML .= "</div>\r\n";
+        $errorsHTML .= "</div></div>";
         echo $errorsHTML;
     }
 }
diff --git a/src/system/taglib/tag.lib.php b/src/system/taglib/tag.lib.php
index 4b062bcc..bec6a6a5 100755
--- a/src/system/taglib/tag.lib.php
+++ b/src/system/taglib/tag.lib.php
@@ -11,7 +11,7 @@ if (!defined('DEDEINC')) exit ('dedebiz');
  */
 function lib_tag(&$ctag, &$refObj)
 {
-    global $dsql, $envs, $cfg_cmsurl, $cfg_tags_dir ,$cfg_rewrite;
+    global $dsql, $envs, $cfg_cmsurl, $cfg_tags_dir, $cfg_rewrite;
     $attlist = "row|30,sort|new,getall|0,typeid|0,ishtml|0";
     FillAttsDefault($ctag->CAttribute->Items, $attlist);
     extract($ctag->CAttribute->Items, EXTR_SKIP);