summaryrefslogtreecommitdiffstats
path: root/web_src/js/features/repo-legacy.js
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2024-03-16 16:08:10 +0100
committerEarl Warren <contact@earl-warren.org>2024-03-20 08:46:30 +0100
commit18256b024ea232d5e6d5050ec3e193b6b6c57d7b (patch)
treeefc9a7c6317df4000325cda1df041ce2e6b73bec /web_src/js/features/repo-legacy.js
parentForbid HTML injection using jQuery (#29843) (diff)
downloadforgejo-18256b024ea232d5e6d5050ec3e193b6b6c57d7b.tar.xz
forgejo-18256b024ea232d5e6d5050ec3e193b6b6c57d7b.zip
Forbid jQuery `.prop` and fix related issues (#29832)
The issue checkbox code received a few more cleanups and I specifically tested it. The other changes are trivial. Also, I checked the cases for how many elements match the jQuery selection to determine querySelector vs. querySelectorAll. --------- Co-authored-by: Giteabot <teabot@gitea.io> (cherry picked from commit 21fe512aac42c9ce3440b8eaae6b2cb2116a0e50)
Diffstat (limited to '')
-rw-r--r--web_src/js/features/repo-legacy.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/web_src/js/features/repo-legacy.js b/web_src/js/features/repo-legacy.js
index 10c25bf28b..96cfa78d0b 100644
--- a/web_src/js/features/repo-legacy.js
+++ b/web_src/js/features/repo-legacy.js
@@ -533,7 +533,7 @@ export function initRepository() {
const gitignores = $('input[name="gitignores"]').val();
const license = $('input[name="license"]').val();
if (gitignores || license) {
- $('input[name="auto_init"]').prop('checked', true);
+ document.querySelector('input[name="auto_init"]').checked = true;
}
});
}