From fca29353aa4c506c65c87465f62d4a5999059589 Mon Sep 17 00:00:00 2001 From: vdbhb59 Date: Fri, 11 Jul 2025 16:52:56 +0530 Subject: [PATCH] Synced duckduckgo spelling fixx:(https://git.lolcat.ca/lolcat/4get/commit/1a00bf8069a4b3d9b842e2e679e4e5ec639255e4) fix potential xss woops: (https://git.lolcat.ca/lolcat/4get/commit/430c0a2f0f72f1254ab65d53f13640fe02418f05) --- scraper/ddg.php | 2 +- web.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scraper/ddg.php b/scraper/ddg.php index c067b04..9ef50c8 100644 --- a/scraper/ddg.php +++ b/scraper/ddg.php @@ -718,7 +718,7 @@ class ddg{ ->getTextContent( $json["suggestion"] ), - "correction" => $json["recourseText"] + "correction" => html_entity_decode($json["recourseText"]) ]; } } diff --git a/web.php b/web.php index ff1fc13..a1588fc 100644 --- a/web.php +++ b/web.php @@ -89,7 +89,7 @@ if($results["spelling"]["type"] != "no_correction"){ '&' . $frontend->buildquery($get, true) . '&spellcheck=no">' . - $results["spelling"]["correction"] . + htmlspecialchars($results["spelling"]["correction"]) . '?' . ''; }