Skip to content

Commit 0b70b58

Browse files
committed
Skip rdfParse if script content is empty
1 parent 85a72c8 commit 0b70b58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

reference/fetcher-classes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class XHTMLHandler {
113113
var scripts = this.dom.getElementsByTagName('script')
114114
for (var i = 0; i < scripts.length; i++) {
115115
var contentType = scripts[i].getAttribute('type')
116-
if (Parsable[contentType]) {
116+
if (Parsable[contentType] && scripts[i].textContent.trim().length) {
117117
rdfParse(scripts[i].textContent, kb, xhr.original.uri, contentType)
118118
}
119119
}

0 commit comments

Comments
 (0)