mirror of
https://github.com/axllent/mailpit.git
synced 2025-09-16 09:26:37 +02:00
Fix: Exclude <script type="application/json"> from HTML check tests
This commit is contained in:
@@ -22,7 +22,7 @@ func runHTMLTests(html string) ([]Warning, int, error) {
|
||||
}
|
||||
|
||||
// Almost all <script> is bad
|
||||
scripts := len(doc.Find("script:not([type=\"application/ld+json\"])").Nodes)
|
||||
scripts := len(doc.Find("script:not([type=\"application/ld+json\"]):not([type=\"application/json\"])").Nodes)
|
||||
if scripts > 0 {
|
||||
var result = Warning{}
|
||||
result.Title = "<script> element"
|
||||
|
Reference in New Issue
Block a user