Merge pull request #120 from projectdiscovery/bugfix-title-regex

improved regex title
This commit is contained in:
bauthard
2020-09-27 12:32:18 +05:30
committed by GitHub
+1 -1
View File
@@ -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