support url started with localhost

This commit is contained in:
chenchao 2019-11-05 10:37:17 +08:00
parent 689fa0526e
commit 5758100f43

View file

@ -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 {