-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: 如果文件名包含#号,上传后返回的链接中#号没有转义为%23导致无法访问 #1121
Comments
#号在 URL 是作为一个合法的 hash 标识符,前端通过 因为有些云服务商是通过 ?xxx 或者 #xxx 来对图片做一些额外处理(比如压缩图片等),这个时候是不能转义这些 URL 里合法标识的。 |
参考 #996 ,无法做所有的字符转义也是有原因的 |
picgo上传之后,腾讯云返回的链接就是没有编码#的链接? 我在腾讯云控制台复制的链接是转义过的,不存在#号 |
我刚才试了腾讯云的nodejs api上传文件,成功之后返回的url是编码过#号的,
也就是说上传的时候,可以指定文件名(key参数), 返回结果会对特殊符号进行编码, |
应该是它对文件名做了encodeURIComponent操作,这个跟encodeURI不一样。 我看看后续版本里做一下处理吧 |
前置阅读 | Pre-reading
PicGo的版本 | PicGo Version
2.3.1
系统信息 | System Information
Windows
问题重现 | Bug reproduce
将图片改名,使其含有#号
上传图片
返回的的url无法访问, 需要把#号改成%23才能访问
相关日志 | Logs
No response
The text was updated successfully, but these errors were encountered: