From 16ee0b368fcf24b48574172726e32a19c275d691 Mon Sep 17 00:00:00 2001 From: lolcat Date: Wed, 26 Jul 2023 19:03:06 -0400 Subject: felt quirky, might commit later --- web.php | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) (limited to 'web.php') diff --git a/web.php b/web.php index b0745e6..b14f8c9 100644 --- a/web.php +++ b/web.php @@ -65,7 +65,13 @@ if($results["spelling"]["type"] != "no_correction"){ $payload["left"] .= '
' . $type . ' ' . htmlspecialchars($results["spelling"]["using"]) . '.
' . - 'Did you mean ' . $results["spelling"]["correction"] . '?' . + 'Did you mean buildquery($get, true) . + '">' . + $results["spelling"]["correction"] . + '?' . '
'; } @@ -120,24 +126,9 @@ if(count($results["image"]) !== 0){ foreach($results["image"] as $image){ - $c = count($image["source"]) - 1; - - if( - preg_match( - '/^data:/', - $image["source"][$c]["url"] - ) - ){ - - $src = htmlspecialchars($image["source"][$c]["url"]); - }else{ - - $src = "/proxy?i=" . urlencode($image["source"][$c]["url"]) . "&s=square"; - } - $right["image"] .= '' . - 'thumb' . + 'thumb' . '
' . $image["source"][0]["width"] . 'x' . $image["source"][0]["height"] . '
' . '
'; } @@ -283,7 +274,7 @@ if(count($results["answer"]) !== 0){ $right["answer"] .= '' . - 'thumb' . + 'thumb' . ''; } @@ -337,7 +328,7 @@ if(count($results["answer"]) !== 0){ case "image": $right["answer"] .= - 'image'; + 'image'; break; case "audio": -- cgit v1.2.3