mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
ImportHandler: Lint the response script sent to the browser
This commit is contained in:
parent
0ff131bbbb
commit
ed80883709
1 changed files with 8 additions and 1 deletions
|
@ -272,6 +272,13 @@ exports.doImport = (req, res, padId) => {
|
|||
status = err.status;
|
||||
}).then(() => {
|
||||
// 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 a new issue