当前位置: 首页 > PbootCMS教程 > pbootcms百度编辑器UEDITOR给超链接默认添加rel="nofollow"标签

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

源码商城 / 2022-10-20
[] [] []
随着越来越多的站长开始重视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"标签

'href' : href,
'target' : $G("target").checked ? "_blank" : '_self',
'title' : $G("title").value.replace(/^\s+|\s+$/g, ''),
'_href':href

修改成:

'href' : href,
'target' : $G("target").checked ? "_blank" : '_self',
'title' : $G("title").value.replace(/^\s+|\s+$/g, ''),
'rel': 'nofollow',
'_href':href


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

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

a:      ['target', 'href', 'title', 'class', 'style','name','id'],
abbr:   ['title', 'class', 'style'],
abbr:   ['title', 'class', 'style'],
area:   ['shape', 'coords', 'href', 'alt'],


修改成:

a:      ['target', 'href', 'title', 'class', 'style','name','rel','id'],
abbr:   ['title', 'class', 'style'],
abbr:   ['title', 'class', 'style'],
area:   ['shape', 'coords', 'href', 'alt'],


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

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

本文链接:http://www.365ymw.com/article-1803.html 转载请保留出处,谢谢!

中查找“pbootcms百度编辑器UEDITOR给超链接默认添加rel="nofollow"标签”更多相关内容

用户评论

暂时还没有任何用户评论
用户名: 匿名用户
E-mail:
评价等级:
评论内容:
验证码: captcha

浏览历史

免责条款 | 隐私保护 | 联系我们 | 公司简介 | 报价单 | 积分商城 | 留言板
Copyright © 2010-2024 365ymw.com All Rights Reserved. 365源码商城
免责声明:部分图片素材及板块内容来自网络,如有侵犯您的权益,请联系我们,站长会立即处理!
备案号:鄂ICP备2024039974号-1