title
菜鸟吧 首页 站长学堂 pbootcms教程 查看内容

pbootcms百度编辑器UEDITOR给超链接默认添加rel="nofollow"标签

2024-11-23 19:46| 发布者: admin| 查看: 1| 评论: 0|原作者: 菜鸟哥

摘要: 随着越来越多的站长开始重视seo了,对rel="nofollow"也在乎得多了。但是由于百度编辑器ueditor并不自带rel="nofollow"功能,在引入其他站点URL链接的时候,就会导致蜘蛛流…… ...

随着越来越多的站长开始重视seo了,对rel="nofollow"也在乎得多了。但是由于百度编辑器ueditor并不自带rel="nofollow"功能,在引入其他站点URL链接的时候,就会导致蜘蛛流失,自己的网站权重下降。

今天AB模板网整理了一下,来教大家怎么改,让ueditor的link自带rel="nofollow"标签,话不多说,直接上图。

1、找到/core/extend/ueditor/dialogs/link/link.html,修改第81行。

pbootcms百度编辑器UEDITOR给超链接默认添加rel="nofollow"标签

1'href': href,

2'target': $G("target").checked ? "_blank": '_self',

3'title': $G("title").value.replace(/^\s+|\s+$/g, ''),

4'_href':href

修改成:

1'href': href,

2'target': $G("target").checked ? "_blank": '_self',

3'title': $G("title").value.replace(/^\s+|\s+$/g, ''),

4'rel': 'nofollow',

5'_href':href


2、找到/core/extend/ueditor/ueditor.config.js,修改第370行。

pbootcms百度编辑器UEDITOR给超链接默认添加rel="nofollow"标签

1a:      ['target', 'href', 'title', 'class', 'style','name','id'],

2abbr:   ['title', 'class', 'style'],

3abbr:   ['title', 'class', 'style'],

4area:   ['shape', 'coords', 'href', 'alt'],


修改成:

1a:      ['target', 'href', 'title', 'class', 'style','name','rel','id'],

2abbr:   ['title', 'class', 'style'],

3abbr:   ['title', 'class', 'style'],

4area:   ['shape', 'coords', 'href', 'alt'],


上述两个文件修改好就可以实现rel="nofollow"了,网站后台测试添加链接,测试成功,演示图如下。

pbootcms百度编辑器UEDITOR给超链接默认添加rel="nofollow"标签


路过

雷人

握手

鲜花

鸡蛋

最新评论

Archiver 手机版 小黑屋 网站地图

Copyright © 2015-2026 菜鸟吧论坛 |找资源研究学习当然上菜鸟吧论坛

警告:本站所有资源收集世界互联网,请下载后24小时之内删除,否則後果自負!
WARNING: ‌All resources from the web. Delete within 24 hours or consequences at your own risk!
郑重声明:站内所有资源均来自互联网或会员投稿发布, 如果侵犯了权益请联系删除,E-mail:cainiaovip8@qq.com 商用请购买正版。

返回顶部