From 72bf3696ee45bca11e20a7b6ba167e77b9e3d9a6 Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 11 Aug 2021 19:51:44 +0530 Subject: [PATCH] correct some unncessary instances of raw HTML injection --- www/common/drive-ui.js | 2 +- www/register/main.js | 8 ++++++-- www/settings/inner.js | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index 15558cf18..cb70986a4 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -1733,7 +1733,7 @@ define([ removeSelected(); refresh(); }); - }, null, true); + }); }; diff --git a/www/register/main.js b/www/register/main.js index 4d9274253..87d9c0513 100644 --- a/www/register/main.js +++ b/www/register/main.js @@ -45,6 +45,7 @@ define([ var test; var I_REALLY_WANT_TO_USE_MY_EMAIL_FOR_MY_USERNAME = false; + var br = function () { return h('br'); }; var registerClick = function () { var uname = $uname.val().trim(); @@ -61,10 +62,13 @@ define([ if (Cred.isEmail(uname) && !I_REALLY_WANT_TO_USE_MY_EMAIL_FOR_MY_USERNAME) { var emailWarning = [ Messages.register_emailWarning0, + br(), br(), Messages.register_emailWarning1, + br(), br(), Messages.register_emailWarning2, + br(), br(), Messages.register_emailWarning3, - ].join('

'); + ]; Feedback.send("EMAIL_USERNAME_WARNING", true); @@ -72,7 +76,7 @@ define([ if (!yes) { return; } I_REALLY_WANT_TO_USE_MY_EMAIL_FOR_MY_USERNAME = true; registerClick(); - }, {}, true); + }); } /* basic validation */ diff --git a/www/settings/inner.js b/www/settings/inner.js index 4dae9add6..79976f2b9 100644 --- a/www/settings/inner.js +++ b/www/settings/inner.js @@ -651,7 +651,7 @@ define([ done: function($dialog) { $dialog.find('> div').addClass('half'); }, - }, true); + }); }; $(form).find('button').click(function() {