请问pbootcms百度编辑器UEDITOR给超链接默认添加rel="nofollow"标签
为了让 PbootCMS 的 UEditor 编辑器给超链接默认添加 rel="nofollow"
标签,你需要按照以下步骤进行修改。
步骤 1: 修改 link.html
文件
-
定位文件:
- 找到
core/extend/ueditor/dialogs/link/link.html
文件。
- 找到
-
修改第 81 行:
- 将原有的代码: javascript
'href' : href, 'target' : $G("target").checked ? "_blank" : '_self', 'title' : $G("title").value.replace(/^\s+|\s+$/g, ''), '_href':href
- 修改为: javascript
'href' : href, 'target' : $G("target").checked ? "_blank" : '_self', 'title' : $G("title").value.replace(/^\s+|\s+$/g, ''), 'rel': 'nofollow', '_href':href
- 将原有的代码: javascript
步骤 2: 修改 ueditor.config.js
文件
-
定位文件:
- 找到
core/extend/ueditor/ueditor.config.js
文件。
- 找到
-
修改第 370 行:
- 将原有的代码: javascript
a: ['target', 'href', 'title', 'class', 'style','name','id'], abbr: ['title', 'class', 'style'], abbr: ['title', 'class', 'style'], area: ['shape', 'coords', 'href', 'alt'],
- 修改为: javascript
a: ['target', 'href', 'title', 'class', 'style','name','rel','id'], abbr: ['title', 'class', 'style'], abbr: ['title', 'class', 'style'], area: ['shape', 'coords', 'href', 'alt'],
- 将原有的代码: javascript
更新时间:2025-04-10 23:59:01
上一篇:请问ZBLOG PHP程序不兼容PHP7.1怎么解决
下一篇:请问SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication p
转载请注明原文链接:https://www.muzicopy.com/suibi/4266.html