mirror of
https://github.com/JefferyHcool/BiliNote.git
synced 2026-08-30 12:40:07 +08:00
用户从各处摘抄的链接常常没有 https:// 前缀(如 bilibili.com/...), 表单校验用 new URL() 解析会直接失败,提示"请输入正确的视频链接"。 校验时对无 scheme 的输入先补 https:// 再解析;提交时同样补全后再发 给后端(本地视频路径除外)。已有明确 scheme 的输入不受影响,ftp:// 等非 http(s) 协议仍被拒绝。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>