From 051b7cfbb8106007e81564a04545076f8214d8be Mon Sep 17 00:00:00 2001
From: Zach Fox <fox@highfidelity.io>
Date: Fri, 30 Nov 2018 16:12:21 -0800
Subject: [PATCH] Fix MS20117: Prevent HTML link from appearing in Wallet
 notification

---
 scripts/system/commerce/wallet.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/system/commerce/wallet.js b/scripts/system/commerce/wallet.js
index d5365133b6..3a8462c5cb 100644
--- a/scripts/system/commerce/wallet.js
+++ b/scripts/system/commerce/wallet.js
@@ -615,7 +615,9 @@ function notificationPollCallbackHistory(historyArray) {
                 ui.notificationDisplayBanner(message);
             } else {
                 for (var i = 0; i < notificationCount; i++) {
-                    message = '"' + (historyArray[i].message) + '" ' +
+                    var historyMessage = historyArray[i].message;
+                    var sanitizedHistoryMessage = historyMessage.replace(/<\/?[^>]+(>|$)/g, "");
+                    message = '"' + sanitizedHistoryMessage + '" ' +
                         "Open INVENTORY to see all activity.";
                     ui.notificationDisplayBanner(message);
                 }