From a9f6d6d491f16b00caaf1d55e98444c26e2c6ebb Mon Sep 17 00:00:00 2001
From: ansuz <ansuz@transitiontech.ca>
Date: Mon, 8 Feb 2021 19:08:46 +0530
Subject: [PATCH] construct the registration warning as a DOM object instead of
 parsing concatenated strings

---
 www/register/main.js | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/www/register/main.js b/www/register/main.js
index 95849e193..3c77d0f53 100644
--- a/www/register/main.js
+++ b/www/register/main.js
@@ -10,9 +10,10 @@ define([
     '/common/common-constants.js',
     '/common/common-feedback.js',
     '/common/outer/local-store.js',
+    '/common/hyperscript.js',
 
     'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
-], function ($, Login, Cryptpad, Test, Cred, UI, Util, Realtime, Constants, Feedback, LocalStore) {
+], function ($, Login, Cryptpad, Test, Cred, UI, Util, Realtime, Constants, Feedback, LocalStore, h) {
     var Messages = Cryptpad.Messages;
 
     $(function () {
@@ -100,7 +101,12 @@ define([
             }
 
             setTimeout(function () {
-            UI.confirm("<h2 class='msg'>" + Messages.register_warning + "</h2>" + Messages.register_warning_note,
+                var span = h('span', [
+                    UI.setHTML(h('h2'), Messages.register_warning), // TODO remove the icon from this translation string and pass it separately
+                    Messages.register_warning_note
+                ]);
+
+            UI.confirm(span,
             function (yes) {
                 if (!yes) { return; }
 
@@ -124,7 +130,7 @@ define([
                 done: function ($dialog) {
                     $dialog.find('> div').addClass('half');
                 },
-            }, true);
+            });
             }, 150);
         };