From 76340027580e9482b4e2cf5830fb74bf6dec7c11 Mon Sep 17 00:00:00 2001 From: Isaakske Date: Fri, 30 Jan 2026 15:14:20 +0100 Subject: [PATCH] prevent jquery code execution --- source/javascripts/app/_lang.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/javascripts/app/_lang.js b/source/javascripts/app/_lang.js index 0fbaaef7046..c9f3d1707e5 100644 --- a/source/javascripts/app/_lang.js +++ b/source/javascripts/app/_lang.js @@ -40,8 +40,14 @@ under the License. window.recacheHeights(); // scroll to the new location of the position - if ($(window.location.hash).get(0)) { - $(window.location.hash).get(0).scrollIntoView(true); + if (window.location.hash) { + var id = window.location.hash.substring(1); + if (id) { + var element = document.getElementById(id); + if (element) { + element.scrollIntoView(true); + } + } } }