santitize, popup class
This commit is contained in:
@@ -97,6 +97,8 @@ import { analyticsClient } from "../../Administration/AnalyticsClient";
|
||||
import { get } from "svelte/store";
|
||||
import { contactPageStore } from "../../Stores/MenuStore";
|
||||
|
||||
|
||||
|
||||
export interface GameSceneInitInterface {
|
||||
initPosition: PointInterface | null;
|
||||
reconnecting: boolean;
|
||||
@@ -921,7 +923,7 @@ export class GameScene extends DirtyScene {
|
||||
);
|
||||
return;
|
||||
}
|
||||
const escapedMessage = HtmlUtils.escapeHtml(openPopupEvent.message);
|
||||
const escapedMessage = HtmlUtils.sanitize(openPopupEvent.message);
|
||||
let html = `<div id="container" hidden><div class="nes-container with-title is-centered">`;
|
||||
html += escapedMessage;
|
||||
if (openPopupEvent.input) {
|
||||
@@ -943,7 +945,7 @@ export class GameScene extends DirtyScene {
|
||||
const container: HTMLDivElement = domElement.getChildByID("container") as HTMLDivElement;
|
||||
container.style.width = objectLayerSquare.width + "px";
|
||||
domElement.scale = 0;
|
||||
domElement.setClassName("popUpElement");
|
||||
domElement.setClassName("popUpElement " + openPopupEvent.popupClass ?? "");
|
||||
|
||||
setTimeout(() => {
|
||||
container.hidden = false;
|
||||
|
||||
Reference in New Issue
Block a user