mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 06:34:20 +00:00
Merge pull request #212 from DioxusLabs/jk/remove-attr-dangerous
fix: add a check for dangerousinnerhtml in interpreter
This commit is contained in:
commit
92ec0a448f
1 changed files with 7 additions and 5 deletions
|
@ -141,15 +141,17 @@ export class Interpreter {
|
|||
}
|
||||
RemoveAttribute(root, name) {
|
||||
const node = this.nodes[root];
|
||||
node.removeAttribute(name);
|
||||
|
||||
if (name === "value") {
|
||||
node.value = "";
|
||||
}
|
||||
if (name === "checked") {
|
||||
} else if (name === "checked") {
|
||||
node.checked = false;
|
||||
}
|
||||
if (name === "selected") {
|
||||
} else if (name === "selected") {
|
||||
node.selected = false;
|
||||
} else if (name == "dangerous_inner_html") {
|
||||
node.innerHTML = "";
|
||||
} else {
|
||||
node.removeAttribute(name);
|
||||
}
|
||||
}
|
||||
handleEdits(edits) {
|
||||
|
|
Loading…
Reference in a new issue