diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index c0b052737..67f39f3ff 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -3703,6 +3703,21 @@ define([ return false; }; + UIElements.fixInlineBRs = function (htmlString) { + if (!htmlString && typeof(htmlString) === 'string') { return; } + var lines = htmlString.split('
'); + if (lines.length === 1) { return lines; } + var len = lines.length - 1; + var result = []; + for (var i = 0; i <= len; i++) { + result.push(lines[i]); + if (i < len) { + result.push(h('br')); + } + } + return result; + }; + UIElements.openSnapshotsModal = function (common, load, make, remove) { var modal; var readOnly = common.getMetadataMgr().getPrivateData().readOnly; diff --git a/www/common/inner/access.js b/www/common/inner/access.js index a1d2c37a1..3f281dc47 100644 --- a/www/common/inner/access.js +++ b/www/common/inner/access.js @@ -981,11 +981,11 @@ define([ common.gotoURL(_href); }, {force: true}); } - return void UI.alert(Messages.properties_passwordSuccess, function () { + return void UI.alert(UIElements.fixInlineBRs(Messages.properties_passwordSuccess), function () { if (!isSharedFolder) { common.gotoURL(_href); } - }, {force: true}); + }); }); }); }); diff --git a/www/drive/inner.js b/www/drive/inner.js index e8586e8e0..79c9974a4 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -279,10 +279,11 @@ define([ tippy: Messages.fm_burnThisDriveButton, drawer: false }, function () { - UI.confirm(Messages.fm_burnThisDrive, function (yes) { + var confirmContent = UIElements.fixInlineBRs(Messages.fm_burnThisDrive); + UI.confirm(confirmContent, function (yes) { if (!yes) { return; } common.getSframeChannel().event('EV_BURN_ANON_DRIVE'); - }, null, true); + }); }); }