forked from MapComplete/MapComplete
Security: purify inputs around innerHTML-usage, remove some unused parameters and classes
This commit is contained in:
parent
e0ee3edf71
commit
fcea3da70f
15 changed files with 44 additions and 127 deletions
|
|
@ -1,7 +1,11 @@
|
|||
import { Store } from "../../Logic/UIEventSource"
|
||||
import BaseUIElement from "../BaseUIElement"
|
||||
import Combine from "./Combine"
|
||||
import { Utils } from "../../Utils"
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
export class VariableUiElement extends BaseUIElement {
|
||||
private readonly _contents?: Store<string | BaseUIElement | BaseUIElement[]>
|
||||
|
||||
|
|
@ -42,7 +46,7 @@ export class VariableUiElement extends BaseUIElement {
|
|||
return
|
||||
}
|
||||
if (typeof contents === "string") {
|
||||
el.innerHTML = contents
|
||||
el.innerHTML = Utils.purify(contents)
|
||||
} else if (contents instanceof Array) {
|
||||
for (const content of contents) {
|
||||
const c = content?.ConstructElement()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue