site bugs
Posted in
8
4:04 am, July 10, 2021
weird search results being recorded
i noticed some weird search results being recorded like this:
the search function should only be recording a result if it finds a result, so this should not be added unless it can actually find this text, which i doubt it.
Some annoying robot is adding this i think.
page: search.page.php
PHP
if($search_value > "") {
$page_content .= $class->list_all(
$start = $start_val,
$max = $page_step,
"search",
$template_file_name,
$search_term = $search_value
);
}
i think the issue is with the search link text being added from the url. it does not validate if the text exists on the page before adding it, so need a check on there before adding it.
I have only allowed the characters on searches, so this should fix the random text issues now.
PHP
$search_text = preg_replace("/[^A-Za-z0-9 ]/", '', $search_text);
see if this solves the problem
View Statistics
This Week
42
This Month
281
This Year
0
Add Comment
Other Items in site bugs
making the search page nicer
add hero title to category listing page [not done]
category listing not working on categories with spaces [not fixed]
Changing the default hero image based on the category name [not yet done]
still more comment spam
search bug Above
weird search results being recorded
this is a weird one table underline appearing and dissapearing on mouse over
change images to upload file also to imgur [reported]
install codemirror for textareas [added]
add a youtube video preloader function, lazy load youtube [fixed]
spin rotate an element on mouse over [css]
add a comment recording system for posts [idea]
fix view page for search links [reported]
should have a different menu colour [reported]
style page numbers [fixed]
linking search results to view pages [finished] 🤣
badge border colour is too dark or light on number badges [fixed]
badge placement is offset in list pages [fixed]
top bar overflow issues [fixed]
Related Search Terms
Other Categories in Code
c testing apache apps asp bat bootstrap bootstrap templates core css css grid design elements fancybox fonts foundation framework gimp git html icons ideas images javascript jquery js linux mac nginx node php php functions php simple html dom pi400 python react sections site bugs site documentation sql sqlite sublime svg templates tools virtual box webdev windows wordpress