mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
fix(api): 🐛 Correctly sanitize checkbox inputs
This commit is contained in:
parent
dc8a64355a
commit
bfbaa7ce2c
1 changed files with 4 additions and 5 deletions
|
|
@ -122,11 +122,10 @@ export const sanitizeHtml = async (
|
||||||
// Only allow disabled checkbox input
|
// Only allow disabled checkbox input
|
||||||
.on("input", {
|
.on("input", {
|
||||||
element(element): void {
|
element(element): void {
|
||||||
if (
|
if (element.getAttribute("type") === "checkbox") {
|
||||||
element.getAttribute("type") === "checkbox" &&
|
element.setAttribute("disabled", "");
|
||||||
element.getAttribute("disabled") === null
|
} else {
|
||||||
) {
|
element.remove();
|
||||||
element.removeAttribute("type");
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue