// Helpers for handling URLs
export function encodeUrl(url) {
  return encodeURI(url);
}

export function decodeUrl(url) {
  return decodeURI(url);
}

export function parseUrl(url) {
  return new URL(url);
}

@@ -193,16 +193,403 @@
 new URL(url);%0A%7D%0A
+%0A// Valid URI schemes for bookmarks%0Aconst VALID_SCHEMES = %5B%0A  'about',%0A  'ftp',%0A  'mailto',%0A  'file',%0A  'data',%0A  'irc',%0A%5D.map(s =%3E %60$%7Bs%7D:%60);%0A%0A// Returns whether this url has a hostname or scheme that lets us travel to it%0A// like a regular tab%0Aexport function hasValidHostname(url) %7B%0A  if (!url.hostname) %7B%0A    return VALID_SCHEMES.includes(url.protocol);%0A  %7D%0A  return !!url.hostname;%0A%7D%0A

Add scheme validation for bookmarks