From 55df99e10719d56e520d651dbbc909edd592adaa Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Tue, 9 Jan 2024 13:17:07 +0100 Subject: [PATCH] Set innerHTML by DomUtil to execute script --- ts/WoltLabSuite/Core/Component/User/List.ts | 3 ++- .../files/js/WoltLabSuite/Core/Component/User/List.js | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ts/WoltLabSuite/Core/Component/User/List.ts b/ts/WoltLabSuite/Core/Component/User/List.ts index 6a8f5bf7c6..b4980d4fd9 100644 --- a/ts/WoltLabSuite/Core/Component/User/List.ts +++ b/ts/WoltLabSuite/Core/Component/User/List.ts @@ -11,6 +11,7 @@ import { dboAction } from "../../Ajax"; import WoltlabCoreDialogElement from "../../Element/woltlab-core-dialog"; import UiPagination from "../../Ui/Pagination"; import { dialogFactory } from "../Dialog"; +import DomUtil from "WoltLabSuite/Core/Dom/Util"; export class UserList { readonly #options: AjaxRequestOptions; @@ -35,7 +36,7 @@ export class UserList { } const dialog = this.#getDialog(); - dialog.content.innerHTML = template; + DomUtil.setInnerHtml(dialog.content, template); dialog.show(this.#dialogTitle); if (this.#pageCount > 1) { diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/User/List.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/User/List.js index 226a281520..8906a8195f 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/User/List.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/User/List.js @@ -6,11 +6,12 @@ * @license GNU Lesser General Public License * @since 6.0 */ -define(["require", "exports", "tslib", "../../Ajax", "../../Ui/Pagination", "../Dialog"], function (require, exports, tslib_1, Ajax_1, Pagination_1, Dialog_1) { +define(["require", "exports", "tslib", "../../Ajax", "../../Ui/Pagination", "../Dialog", "WoltLabSuite/Core/Dom/Util"], function (require, exports, tslib_1, Ajax_1, Pagination_1, Dialog_1, Util_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UserList = void 0; Pagination_1 = tslib_1.__importDefault(Pagination_1); + Util_1 = tslib_1.__importDefault(Util_1); class UserList { #options; #dialogTitle; @@ -30,7 +31,7 @@ define(["require", "exports", "tslib", "../../Ajax", "../../Ui/Pagination", "../ this.#pageNo = pageNo; } const dialog = this.#getDialog(); - dialog.content.innerHTML = template; + Util_1.default.setInnerHtml(dialog.content, template); dialog.show(this.#dialogTitle); if (this.#pageCount > 1) { const element = dialog.content.querySelector(".jsPagination"); -- 2.20.1