mirror of
https://github.com/versia-pub/server.git
synced 2026-04-27 20:59:15 +02:00
refactor(api): ♻️ Use URL literal instead of strings
This commit is contained in:
parent
99fac323c8
commit
76d1ccc859
50 changed files with 343 additions and 256 deletions
|
|
@ -136,7 +136,11 @@ export const sanitizeHtml = async (
|
|||
element(element): void {
|
||||
element.setAttribute(
|
||||
"src",
|
||||
proxyUrl(element.getAttribute("src") ?? "") ?? "",
|
||||
element.getAttribute("src")
|
||||
? proxyUrl(
|
||||
new URL(element.getAttribute("src") as string),
|
||||
).toString()
|
||||
: "",
|
||||
);
|
||||
},
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue