From 67c53a9f557cc306186ee47116d4f446f8324a20 Mon Sep 17 00:00:00 2001 From: Mzack9999 Date: Sat, 26 Sep 2020 21:34:05 +0200 Subject: [PATCH] improved regex title --- common/httpx/title.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/httpx/title.go b/common/httpx/title.go index be7ef4e..a3cede0 100644 --- a/common/httpx/title.go +++ b/common/httpx/title.go @@ -9,7 +9,7 @@ import ( // ExtractTitle from a response func ExtractTitle(r *Response) (title string) { - var re = regexp.MustCompile(`(?im)<\s*title *>(.*?)<\s*/\s*title>`) + var re = regexp.MustCompile(`(?im)<\s*title.*>(.*?)<\s*/\s*title>`) for _, match := range re.FindAllString(r.Raw, -1) { title = html.UnescapeString(trimTitleTags(match)) break