mirror of
https://github.com/projectdiscovery/httpx.git
synced 2024-11-24 13:14:01 +03:00
Update title.go
Make regexp for the title tag case-insensitive
This commit is contained in:
parent
6afdaf5c56
commit
e4fc712efc
@ -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))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user