diff --git a/common/httpx/title.go b/common/httpx/title.go index c24b8ef..e505112 100644 --- a/common/httpx/title.go +++ b/common/httpx/title.go @@ -9,7 +9,7 @@ import ( // ExtractTitle from a response func ExtractTitle(r *Response) string { - var re = regexp.MustCompile(`(?m)<\s*title *>(.*?)<\s*/\s*title>`) + var re = regexp.MustCompile(`(?im)<\s*title *>(.*?)<\s*/\s*title>`) for _, match := range re.FindAllString(r.Raw, -1) { return html.UnescapeString(trimTitleTags(match)) }