From 50956c51f77f37ca3f467f5e5871ec0864e3b126 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Sun, 28 Jan 2018 10:57:05 +0000 Subject: [PATCH] Wrap notification messages in

when needed --- editor/js/ui/notifications.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/editor/js/ui/notifications.js b/editor/js/ui/notifications.js index a9e1f387b..8bd153e10 100644 --- a/editor/js/ui/notifications.js +++ b/editor/js/ui/notifications.js @@ -86,6 +86,9 @@ RED.notifications = (function() { } n.style.display = "none"; if (typeof msg === "string") { + if (!/

/i.test(msg)) { + msg = "

"+msg+"

"; + } n.innerHTML = msg; } else { $(n).append(msg); @@ -153,6 +156,9 @@ RED.notifications = (function() { var nn = n; return function(msg,options) { if (typeof msg === "string") { + if (!/

/i.test(msg)) { + msg = "

"+msg+"

"; + } nn.innerHTML = msg; } else { $(nn).empty().append(msg);