about summary refs log tree commit diff stats
path: root/backend.php
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2026-03-22 14:18:46 +0300
committerAndrew Dolgov <fox@fakecake.org>2026-03-22 14:18:46 +0300
commit1bd62f4b2fb9fb18e544a068c2ec5548b3d73095 (patch)
tree9f2a030debcb211bd7cf019d058cb810a3740f56 /backend.php
parent6693c470c75eddaee4fc9037bce2829ad0be3f8d (diff)
downloadthe-epube-1bd62f4b2fb9fb18e544a068c2ec5548b3d73095.tar.gz
the-epube-1bd62f4b2fb9fb18e544a068c2ec5548b3d73095.tar.xz
drop wiktionary, doesn't work, possibly insecure
Diffstat (limited to 'backend.php')
-rw-r--r--backend.php15
1 files changed, 0 insertions, 15 deletions
diff --git a/backend.php b/backend.php
index a08c345..865c165 100644
--- a/backend.php
+++ b/backend.php
@@ -262,21 +262,6 @@
 		print json_encode(["page" => $page, "cfi" => $cfi]);
 		break;
 
-	case "wikisearch":
-		$query = urlencode(strip_tags($_REQUEST['query']));
-		$url = "https://en.wiktionary.org/w/api.php?titles=${query}&action=query&prop=extracts&format=json&exlimit=1";
-
-		if ($resp = file_get_contents($url)) {
-			$resp = json_decode($resp, true);
-
-			foreach ($resp['query']['pages'] as &$page) {
-				$page['extract'] = Sanitizer::sanitize($page['extract']);
-			}
-
-			print json_encode($resp);
-		}
-		break;
-
 	case "define":
 		if (Config::get(Config::DICT_SERVER)) {
 			/** @return array<string> */