MiniValine icon indicating copy to clipboard operation
MiniValine copied to clipboard

5.x版本网站链接含有"/b"时的昵称超链接异常问题

Open amtoaer opened this issue 4 years ago • 2 comments

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)时,昵称的超链接失效。 image 查看控制台“网络”页面,发现请求到的结果是正确的。 image 网站元素显示超链接如下: image 对比两个内容:

https://blog.allwens.work
https:/˻log.allwens.work

可以看到,渲染评论时网站链接中的“/b”被替换为了“˻”,从而导致了超链接的失效。

Steps to reproduce the behavior

  1. 评论时网址包含“/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

amtoaer avatar Jan 09 '22 13:01 amtoaer

Thanks for opening this issue, maintainers will get back to you as soon as possible!

welcome[bot] avatar Jan 09 '22 13:01 welcome[bot]

更新:如下代码导致了问题 https://github.com/MiniValine/MiniValine/blob/60eb9064adf2f81bb4549b57955c22dc0b73286a/src/body/vcard.js#L7-L9 https://blog.allwens.work经该替换后,变为了https:&#x2F&#x2Fblog.allwens.work,使用html展示为: image

amtoaer avatar Jan 11 '22 10:01 amtoaer