From 11a397359a64196b581c824a58c33a4fea825c34 Mon Sep 17 00:00:00 2001 From: Merci Jacob <68013195+mercihabam@users.noreply.github.com> Date: Tue, 26 Nov 2024 12:27:33 +0200 Subject: [PATCH] fix(frontend): cut off content polluting the prev & next links and address the incompatibility between Cash and jQuery in the advanced search checkboxes generator (#1387) * fix Cash library incompatibility with jQuery in the advanced search checkboxes generator script * Cut off the body content included in the previous and next links --- modules/advanced_search/site.js | 4 ++-- modules/core/site.js | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/advanced_search/site.js b/modules/advanced_search/site.js index 96dd7a37e..b8cf2020f 100644 --- a/modules/advanced_search/site.js +++ b/modules/advanced_search/site.js @@ -113,7 +113,7 @@ var adv_select_imap_folder = function(el) { folders.show(); folders.find('li').each(function(index) { - const wrapper = $('
'); + const wrapper = $(''); $(this).wrapInner(wrapper); const allSpecialFoldersCheckbox = ` @@ -130,7 +130,7 @@ var adv_select_imap_folder = function(el) { const checkboxesWrapper = $(''); checkboxesWrapper.append(allSpecialFoldersCheckbox); checkboxesWrapper.append(allFoldersCheckbox); - wrapper.append(checkboxesWrapper); + $(this).find('.wrapper').append(checkboxesWrapper); }) $('.imap_folder_link', folders).addClass('adv_folder_link').removeClass('imap_folder_link'); diff --git a/modules/core/site.js b/modules/core/site.js index afbffcccd..27b074934 100644 --- a/modules/core/site.js +++ b/modules/core/site.js @@ -849,16 +849,17 @@ function Message_List() { const next = messages.getNextRowForMessage(msgUid); const prev = messages.getPreviousRowForMessage(msgUid); if (prev) { - const prevSubject = $(prev['0']).find('.subject'); - phref = prevSubject.find('a').prop('href'); - const subject = new Option(prevSubject.text()).innerHTML; + const prevSubject = $(prev['0']).find('.subject a'); + phref = prevSubject.prop('href'); + const subject = prevSubject.text(); const plink = ' '+subject+''; $('