sanitized user view as well
This commit is contained in:
parent
e110ce5135
commit
f19fef7c57
@ -7,6 +7,7 @@ import { TemplateFactory } from "../template/TemplateFactory";
|
||||
import { ActiveUserViewModel } from "../viewmodel/ActiveUserViewModel";
|
||||
import { ChatModel } from "../model/ChatModel";
|
||||
import log = require("loglevel");
|
||||
import * as DOMPurify from "dompurify";
|
||||
|
||||
export class UserView implements Observer {
|
||||
private readonly _model: Model;
|
||||
@ -30,7 +31,8 @@ export class UserView implements Observer {
|
||||
data.forEach((element: ActiveUserViewModel) => {
|
||||
html += template(element);
|
||||
});
|
||||
this._element.innerHTML = html;
|
||||
// this._element.innerHTML = html;
|
||||
$(this._element).html(DOMPurify.sanitize(html));
|
||||
this.addUserCallBacks();
|
||||
console.log(this._element.innerHTML);
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user