mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
ImportHandler: Use JSON.stringify()
to properly escape characters
This commit is contained in:
parent
ed80883709
commit
26b5a69ccc
2 changed files with 1 additions and 2 deletions
|
@ -276,7 +276,7 @@ exports.doImport = (req, res, padId) => {
|
|||
'<script>',
|
||||
"document.addEventListener('DOMContentLoaded', () => {",
|
||||
' window.parent.padimpexp.handleFrameCall(',
|
||||
` '${req.directDatabaseAccess}', '${status}');`,
|
||||
` ${JSON.stringify(!!req.directDatabaseAccess)}, ${JSON.stringify(status)});`,
|
||||
'});',
|
||||
'</script>',
|
||||
].join('\n'));
|
||||
|
|
|
@ -171,7 +171,6 @@ const padimpexp = (() => {
|
|||
$('.disabledexport').click(cantExport);
|
||||
},
|
||||
handleFrameCall: (directDatabaseAccess, status) => {
|
||||
if (directDatabaseAccess === 'undefined') directDatabaseAccess = false;
|
||||
if (status !== 'ok') {
|
||||
importErrorMessage(status);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue