Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

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

Open
3 tasks done
amtoaer opened this issue Jan 9, 2022 · 2 comments
Open
3 tasks done

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

amtoaer opened this issue Jan 9, 2022 · 2 comments

Comments

@amtoaer
Copy link

amtoaer commented Jan 9, 2022

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

  • I am using the latest version of MiniValine.
  • I have reviewed the MiniValine FAQs, which does not help me.
  • 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

@welcome
Copy link

welcome bot commented Jan 9, 2022

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

@amtoaer
Copy link
Author

amtoaer commented Jan 11, 2022

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant