From ce0a089c662f7a0fc692dbf4a750807d8588b0b0 Mon Sep 17 00:00:00 2001 From: David Bushell Date: Wed, 11 Mar 2026 10:58:53 +0000 Subject: [PATCH] improve title regexp --- src/routes/bookmarks/title/+server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/bookmarks/title/+server.ts b/src/routes/bookmarks/title/+server.ts index 0caf4d1..abf0d09 100644 --- a/src/routes/bookmarks/title/+server.ts +++ b/src/routes/bookmarks/title/+server.ts @@ -25,7 +25,7 @@ export const POST: RequestHandler = async (event) => { throw new Error(); } const html = await response.text(); - const match = html.match(/(.+?)<\/title>/); + const match = html.match(/<title[^>]*>(.+?)<\/title>/); if (match === null) { throw new Error(); } -- 2.51.2