mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
fix(api): 🐛 Correctly sanitize checkbox inputs
This commit is contained in:
parent
dc8a64355a
commit
bfbaa7ce2c
|
|
@ -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…
Reference in a new issue