Skip to content

Commit cbc6f51

Browse files
committed
[plugin.from_html] Title tag is rendered
Fixes #416
1 parent 055fd45 commit cbc6f51

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jspdf.plugin.from_html.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,10 @@
483483
};
484484
}
485485
}
486-
renderer.addText(value, fragmentCSS);
486+
// Only add the text if the text node is in the body element
487+
if (cn.ownerDocument.body.contains(cn)){
488+
renderer.addText(value, fragmentCSS);
489+
}
487490
} else if (typeof cn === "string") {
488491
renderer.addText(cn, fragmentCSS);
489492
}

0 commit comments

Comments
 (0)