mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-26 00:37:37 +08:00
fixed alerts not escaping html
This commit is contained in:
parent
589d705f1e
commit
d8b5f818c7
1 changed files with 3 additions and 2 deletions
|
|
@ -7,6 +7,7 @@ import * as NotificationEvent from "../observables/notification-event";
|
|||
import * as BadgeController from "../controllers/badge-controller";
|
||||
import * as Notifications from "../elements/notifications";
|
||||
import * as ConnectionState from "../states/connection";
|
||||
import { escapeHTML } from "../utils/misc";
|
||||
|
||||
let accountAlerts: MonkeyTypes.MonkeyMail[] = [];
|
||||
let maxMail = 0;
|
||||
|
|
@ -255,7 +256,7 @@ export function addPSA(message: string, level: number): void {
|
|||
<div class="item">
|
||||
<div class="indicator ${levelClass}"></div>
|
||||
<div class="body">
|
||||
${message}
|
||||
${escapeHTML(message)}
|
||||
</div>
|
||||
</div>
|
||||
`);
|
||||
|
|
@ -289,7 +290,7 @@ function addNotification(
|
|||
<div class="indicator ${levelClass}"></div>
|
||||
<div class="title">${title}</div>
|
||||
<div class="body">
|
||||
${message}
|
||||
${escapeHTML(message)}
|
||||
</div>
|
||||
</div>
|
||||
`);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue