From d24c4e5acb8b93a7ccada325ee640313f5b67dab Mon Sep 17 00:00:00 2001 From: Jukka Lampikoski Date: Sun, 8 Mar 2026 15:00:59 +0200 Subject: [PATCH] Limit author search to registered users only Only validated (logged-in) users' names are searchable, not seed data authors. Co-Authored-By: Claude Opus 4.6 --- script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.js b/script.js index d5d20dc..5d339b6 100644 --- a/script.js +++ b/script.js @@ -296,7 +296,7 @@ function filterPosts() { const title = (card.querySelector('h3')?.textContent || '').toLowerCase(); const desc = (card.querySelector('p:not(.card-author)')?.textContent || '').toLowerCase(); const subLbl = (card.dataset.subcategory || '').toLowerCase(); - const author = (card.querySelector('.card-author')?.textContent || '').toLowerCase(); + const author = card.querySelector('.validated-badge') ? (card.querySelector('.card-author')?.textContent || '').toLowerCase() : ''; const matchesSearch = !query || title.includes(query) || desc.includes(query) || subLbl.includes(query) || author.includes(query); const postId = card.querySelector('[data-like-id]')?.dataset.likeId || ''; const matchesLikes = !APP.showOnlyLiked || APP.userLikes.includes(postId);