Ignores about: and javascript: schemes

This commit is contained in:
Tom Hudson
2023-06-22 15:48:26 +01:00
parent 52ca8aa5f1
commit 3e75fdb4e7

View File

@@ -57,9 +57,12 @@ func (a *Analyzer) GetURLs() []*URL {
match.BodyParams = []string{}
}
// Filter out data: and tel: schemes
// Filter out data: and tel: schemes etc
lower := strings.ToLower(match.URL)
if strings.HasPrefix(lower, "data:") || strings.HasPrefix(lower, "tel:") {
if strings.HasPrefix(lower, "data:") ||
strings.HasPrefix(lower, "tel:") ||
strings.HasPrefix(lower, "about:") ||
strings.HasPrefix(lower, "javascript:") {
continue
}