Skip to content
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

iframe 块的资源不支持 // 开头的 URL #4434

Closed
Zuoqiu-Yingyi opened this issue Mar 29, 2022 · 4 comments
Closed

iframe 块的资源不支持 // 开头的 URL #4434

Zuoqiu-Yingyi opened this issue Mar 29, 2022 · 4 comments
Assignees
Labels
Milestone

Comments

@Zuoqiu-Yingyi
Copy link
Contributor

Zuoqiu-Yingyi commented Mar 29, 2022

描述问题 Describe the problem

// 开头的 URL 是一个合法的 protocol-relative URL, 详情请参考 http - Can a URL start with "//"? - Stack Overflow, 但插入时出现如下错误

main.9a057395dbc2d4f4c1de.js:1 Uncaught TypeError: Failed to construct 'URL': Invalid URL
    at HTMLInputElement.<anonymous> (main.9a057395dbc2d4f4c1de.js:1)
(anonymous) @ main.9a057395dbc2d4f4c1de.js:1

期待的结果 Expected result

支持 // 开头的 URL

版本环境 Version environment

  • Version: 1.9.5
@88250
Copy link
Member

88250 commented Mar 30, 2022

不考虑了,因为实现上用了协议作为一些条件判断。

@88250 88250 closed this as completed Mar 30, 2022
@Zuoqiu-Yingyi
Copy link
Contributor Author

这种 URL 视为 http 协议或者 https 协议均可

@88250
Copy link
Member

88250 commented Mar 30, 2022

咦,我这里好像没有报错。

@Zuoqiu-Yingyi
Copy link
Contributor Author

Zuoqiu-Yingyi commented Mar 30, 2022

咦,我这里好像没有报错。

//player.bilibili.com/player.html?aid=895154192&bvid=BV1NP4y1M72N&cid=562898119&page=1
试试这个 URL, 需要在资源 input 粘贴后单击回车

只在第一次单击回车时触发错误

@88250 88250 added the Bug label Mar 30, 2022
@88250 88250 added this to the 1.9.6 milestone Mar 30, 2022
@88250 88250 reopened this Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants