support url started with localhost

jh-changes
chenchao 5 years ago
parent 689fa0526e
commit 5758100f43
  1. 2
      src/shared/urls.ts

@ -5,7 +5,7 @@ const trimStart = (str: string): string => {
return str.replace(/^\s+/, ''); return str.replace(/^\s+/, '');
}; };
const SUPPORTED_PROTOCOLS = ['http:', 'https:', 'ftp:', 'mailto:', 'about:']; const SUPPORTED_PROTOCOLS = ['http:', 'https:', 'ftp:', 'mailto:', 'about:', 'localhost:'];
const searchUrl = (keywords: string, search: Search): string => { const searchUrl = (keywords: string, search: Search): string => {
try { try {