From b70bc41b0595a53863ee7d3a41a40a3a76882001 Mon Sep 17 00:00:00 2001 From: Luis M Rodriguez-R Date: Sun, 21 Sep 2025 15:32:17 +0200 Subject: [PATCH] Potential fix for code scanning alert no. 25: DOM text reinterpreted as HTML Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- app/views/page/seqcode.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/page/seqcode.html.erb b/app/views/page/seqcode.html.erb index 6ac56c13..340900ea 100644 --- a/app/views/page/seqcode.html.erb +++ b/app/views/page/seqcode.html.erb @@ -20,7 +20,7 @@ $(this).attr('href', '#' + $(this).parent().attr('id')); }); $('#seqcode-down .link-to-id [name]').each(function(idx){ - $(this).siblings('.linker').attr('href', '#' + $(this).attr('name')); + $(this).siblings('.linker').attr('href', '#' + encodeURIComponent($(this).attr('name'))); }); // Smooth scrolling $(document).on('click', 'a[href^="#"]', function (event) {