mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
fix(components): use protocol-relative URLs
This commit is contained in:
parent
896f5f8c53
commit
c0d23af500
@ -48,7 +48,8 @@ const processDescLinks = () => {
|
||||
continue
|
||||
}
|
||||
|
||||
const link = matchText.includes('http') ? matchText : `http://${matchText}`
|
||||
// Use protocol-relative URL with // instead of http:// or https://
|
||||
const link = matchText.startsWith('www.') ? `//${matchText}` : matchText.replace(/^https?:/, '')
|
||||
const replacement = `<a href='${link}' target='_blank'>${matchText}</a>`
|
||||
|
||||
newContent =
|
||||
|
||||
Loading…
Reference in New Issue
Block a user