mirror of
https://github.com/projectdiscovery/httpx
synced 2026-06-08 16:50:17 +00:00
Merge pull request #120 from projectdiscovery/bugfix-title-regex
improved regex title
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user