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

模板商城2025-09-02 17:00 9 浏览
分享:
点赞 收藏

 未标题-1.png

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

 
今天AB模板网整理了一下,来教大家怎么改,让ueditor的link自带rel="nofollow"标签,话不多说,直接上图。 
 
1、找到/core/extend/ueditor/dialogs/link/link.html,修改第81行。

ce0ba9c98669a45b56ac098e20116a1c_1-220213100025347.png

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行。

72be875f896d9374a9e66e548e80af81_1-2202131003253K.png

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"了,网站后台测试添加链接,测试成功,演示图如下。

a2f9c03a675ae8df94eb4e3d4fc566b9_1-22021310061J03.png


本站所有资源都是由网友投搞发布,或转载各大下载站,请自行检测软件的完整性!本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!如有侵权请联系我们删除下架,联系方式:7855231#qq.com
评论0评论
游客