Forum Replies Created
-
AuthorPosts
-
April 2, 2025 at 1:27 pm in reply to: media results: elementor generated thumbnails and other items showing #53573
kerry_avxz
ParticipantYou cannot access this content.
kerry_avxz
ParticipantYou cannot access this content.
kerry_avxz
ParticipantYou cannot access this content.
kerry_avxz
ParticipantYou cannot access this content.
kerry_avxz
ParticipantHey there, fresh eyes this morning and realised what i can do with this as it isnt a problem with ASP but its the parsed text thats the issue.
I have added the following to my code to strip the content area:$pdf_asp_content = get_post_field( ‘_asp_attachment_text’, $post_id );
$sanitised_content = wp_strip_all_tags( $pdf_asp_content );
echo $sanitised_content;this then still allows for Highlighter on the content 🙂
kerry_avxz
ParticipantAh ok no worries, that explains it 🙂
I have written some script to get around it for now:
document.addEventListener("DOMContentLoaded", function () { const params = new URLSearchParams(window.location.search); const keyword = params.get('asp_ls'); if (!keyword) return; const container = document.querySelector('#highlighter'); if (!container) return; const regex = new RegExp(<code>(${keyword})</code>, 'gi'); // Recursive function to walk through text nodes function highlightTextNodes(node) { if (node.nodeType === Node.TEXT_NODE) { if (regex.test(node.textContent)) { const span = document.createElement('span'); span.innerHTML = node.textContent.replace(regex, '<mark>$1</mark>'); node.replaceWith(span); } } else if (node.nodeType === Node.ELEMENT_NODE && node.nodeName !== "SCRIPT" && node.nodeName !== "STYLE") { for (let i = 0; i < node.childNodes.length; i++) { highlightTextNodes(node.childNodes[i]); } } } highlightTextNodes(container); });February 28, 2025 at 5:39 pm in reply to: media results: elementor generated thumbnails and other items showing #53156kerry_avxz
ParticipantThats it! thank you! so simple when you see it. How did i miss that. really appreciate it.
February 28, 2025 at 12:10 pm in reply to: media results: elementor generated thumbnails and other items showing #53142kerry_avxz
Participantmy categories
February 21, 2025 at 1:57 pm in reply to: Elementor loops in live search breaking with the ajax filters #53035kerry_avxz
ParticipantSir! you are absolute scholar and gent! that did it thanks 🙂
February 21, 2025 at 1:42 pm in reply to: Elementor loops in live search breaking with the ajax filters #53032kerry_avxz
Participantthanks on the intial search, I will look for this css loader.
The icon you pointed out fires a off-canvas type modal when clicking that icon. but it wont after filter change. that was more my query on that screen. Thanks again for a quick reply 🙂-
This reply was modified 1 year, 3 months ago by
kerry_avxz.
kerry_avxz
ParticipantYou cannot access this content.
kerry_avxz
ParticipantYou cannot access this content.
-
This reply was modified 1 year, 3 months ago by
-
AuthorPosts