5.x版本网站链接含有"/b"时的昵称超链接异常问题
Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate. 请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。
Issue Checklist
- [x] I am using the latest version of MiniValine.
- [x] I have reviewed the MiniValine FAQs, which does not help me.
- [x] I have searched for current issues, which does not help me.
Expected behavior
评论网址中含有“/b”时,昵称的超链接正常使用。
Actual behavior
评论时网址包含'/b'(例子中是https://blog.allwens.work)时,昵称的超链接失效。
查看控制台“网络”页面,发现请求到的结果是正确的。
网站元素显示超链接如下:
对比两个内容:
https://blog.allwens.work
https:/˻log.allwens.work
可以看到,渲染评论时网站链接中的“/b”被替换为了“˻”,从而导致了超链接的失效。
- Links to demo site with this issue: 官方文档 demo 的测试
- Links to repository or source code of the blog: N/A
Steps to reproduce the behavior
- 评论时网址包含“/b”
Environment Information
以下内容取自官方 demo。
Node.js and NPM Information
Package dependencies Information
HTML Configuration
<script src='//cdn.jsdelivr.net/npm/minivaline@5/dist/MiniValine.min.js'></script>
MiniValine Configuration
MiniValine: {
appId: 'MEEC7WU3MbE2gfGU0apei89u-MdYXbMMI',
appKey: 'NQ91iwhxPcrPoAmSu4wpEJ8g',
placeholder: '评论一下吧~',
mode: 'xCss',
lang: 'zh-CN',
//更多选项 https://minivaline.js.org/docs/en/#/Options 除了 [el] 选项,这个已经在插件里体现了
visitor: true,
RecordIP: true,
region: true,
md: true,
math: true,
enableUA: true,
},
Other Information
Thanks for opening this issue, maintainers will get back to you as soon as possible!
更新:如下代码导致了问题
https://github.com/MiniValine/MiniValine/blob/60eb9064adf2f81bb4549b57955c22dc0b73286a/src/body/vcard.js#L7-L9
https://blog.allwens.work经该替换后,变为了https:/˻log.allwens.work,使用html展示为:
