1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Disable Javascript for printout window

This commit is contained in:
AWolf81
2019-08-01 01:35:11 +02:00
committed by Junyoung Choi
parent 2f1dadfc3e
commit 857e75594d

View File

@@ -363,7 +363,7 @@ export default class MarkdownPreview extends React.Component {
handleSaveAsPdf () {
this.exportAsDocument('pdf', (noteContent, exportTasks, targetDir) => {
const printout = new remote.BrowserWindow({show: false, webPreferences: {webSecurity: false}})
const printout = new remote.BrowserWindow({show: false, webPreferences: {webSecurity: false, javascript: false}})
printout.loadURL('data:text/html;charset=UTF-8,' + this.htmlContentFormatter(noteContent, exportTasks, targetDir))
return new Promise((resolve, reject) => {
printout.webContents.on('did-finish-load', () => {