1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-03-17 21:18:19 +02:00

Fix: Exclude <script type="application/json"> from HTML check tests

This commit is contained in:
Ralph Slooten 2023-08-03 17:33:50 +12:00
parent 86a4633d24
commit 103bd564ab

View File

@ -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"