mirror of
https://github.com/projectdiscovery/httpx.git
synced 2024-10-27 02:22:13 +03:00
improved regex title
This commit is contained in:
parent
3a5c56480a
commit
67c53a9f55
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user