mirror of
https://github.com/overte-org/overte.git
synced 2025-04-10 19:29:07 +02:00
Sanitize notification text.
Signed-off-by: Armored Dragon <publicmail@armoreddragon.com>
This commit is contained in:
parent
647dbf9cea
commit
112bd816ec
1 changed files with 3 additions and 0 deletions
|
@ -21,6 +21,8 @@ var DEFAULT_SIZE = 30;
|
|||
var DEFAULT_OFFSET = 10;
|
||||
var FLOOF_NOTIFICATION_CHANNEL = "Floof-Notif";
|
||||
var MAIN_CHAT_APP_CHANNEL = "Chat";
|
||||
var ARROW_REGEX = /\</gi;
|
||||
|
||||
|
||||
var offset = DEFAULT_OFFSET;
|
||||
|
||||
|
@ -65,6 +67,7 @@ var notificationCore = {
|
|||
colour = colour ? colour : {};
|
||||
colour.text = colour.text ? colour.text : {red: 255, green: 255, blue: 255};
|
||||
colour.bg = colour.bg ? colour.bg : {red: 10, green: 10, blue: 10};
|
||||
text = text.replace(ARROW_REGEX, "<");
|
||||
var lines = text.split("\n");
|
||||
for (var i = lines.length - 1; i >= 0; i--) {
|
||||
if (i === 0) {
|
||||
|
|
Loading…
Reference in a new issue