Skip to content
Snippets Groups Projects
Verified Commit 7effe264 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: dont parse script or styles

parent 5ce40d71
No related branches found
No related tags found
No related merge requests found
......@@ -232,6 +232,15 @@ func prepareTextNodes(node *html.Node, storage *types.PageData) {
}
func runNodes(n *html.Node, storage *types.PageData) {
if n.Parent != nil {
if n.Parent.Type == html.ElementNode {
if n.Parent.Data == "script" || n.Parent.Data == "style" {
return
}
}
}
if n.Type == html.TextNode {
content := strings.TrimSpace(n.Data)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment