Browse code

modules/challenges/otherresults.php: change filter to match other patched modules

Clarissa Walker authored on 2026/11/03 14:45:51
Showing 1 changed files
... ...
@@ -50,10 +50,10 @@ if(is_array($catid) && count($catid) > 0) {
50 50
 	// Now implode the SQL list
51 51
 	if(!empty($cats)) $chalquery[] = "(".implode(" OR ", $cats).")";
52 52
 }
53
+if($searchterm !== false) $searchterm = str_replace(array('%', '_'), array('\\%', '\\_'), escapestring($searchterm));
53 54
 if($searchterm) {
54
-	$ef_st = escapestring(str_replace(array('\\', '%', '_'), array('\\\\', '\\%', '\\_'), stripslashes($searchterm)));
55
-	if($searchtype == "title") $chalquery[] = "title LIKE '%$ef_st%'";
56
-	if($searchtype == "summary") $chalquery[] = "summary LIKE '%$ef_st%'";
55
+	if($searchtype == "title") $chalquery[] = "title LIKE '%$searchterm%'";
56
+	if($searchtype == "summary") $chalquery[] = "summary LIKE '%$searchterm%'";
57 57
 }
58 58
 if(count($chalquery) > 0) {
59 59
 	$chalquery = "WHERE ".implode(" AND ", $chalquery);