Merge pull request #14513 from zfox23/MS20117_rawHtmlRemoval

Fix MS20117: Prevent HTML link from appearing in Wallet notification
This commit is contained in:
Zach Fox 2018-12-03 10:27:32 -08:00 committed by GitHub
commit 2776839dff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}