Forbid jQuery is and fix issues (#30016)

Tested all functionality.

---------

Co-authored-by: Yarden Shoham <git@yardenshoham.com>
This commit is contained in:
silverwind 2024-03-24 18:56:02 +01:00 committed by GitHub
parent 8d93cea296
commit 0a2f973de9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 9 additions and 9 deletions

View file

@ -373,7 +373,7 @@ function initGlobalShowModal() {
if (attrTargetAttr) {
$attrTarget[0][attrTargetAttr] = attrib.value;
} else if ($attrTarget.is('input') || $attrTarget.is('textarea')) {
} else if ($attrTarget[0].matches('input, textarea')) {
$attrTarget.val(attrib.value); // FIXME: add more supports like checkbox
} else {
$attrTarget.text(attrib.value); // FIXME: it should be more strict here, only handle div/span/p