ImportHandler: Lint the response script sent to the browser
parent
0ff131bbbb
commit
ed80883709
|
@ -272,6 +272,13 @@ exports.doImport = (req, res, padId) => {
|
||||||
status = err.status;
|
status = err.status;
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
// close the connection
|
// close the connection
|
||||||
res.send(`<script>document.addEventListener('DOMContentLoaded', function(){ var impexp = window.parent.padimpexp.handleFrameCall('${req.directDatabaseAccess}', '${status}'); })</script>`);
|
res.send([
|
||||||
|
'<script>',
|
||||||
|
"document.addEventListener('DOMContentLoaded', () => {",
|
||||||
|
' window.parent.padimpexp.handleFrameCall(',
|
||||||
|
` '${req.directDatabaseAccess}', '${status}');`,
|
||||||
|
'});',
|
||||||
|
'</script>',
|
||||||
|
].join('\n'));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue