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
- 将原有的代码:
步骤 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'],
- 将原有的代码:

扫码添加技术【解决问题】
专注企业网站建设、网站安全16年。
承接:企业网站建设、网站修改、网站改版、BUG修复、问题处理、二次开发、PSD转HTML、网站被黑、网站漏洞修复等。
专业解决各种疑难杂症,您有任何网站问题都可联系我们技术人员。
本文来自博客园,作者:黄文Rex,转载请注明原文链接:https://www.cnblogs.com/hwrex/p/18447016

浙公网安备 33010602011771号