(search) Correct handling of languages on fandom

This commit is contained in:
Viktor Lofgren 2024-09-01 13:46:01 +02:00
parent bfb7ed2c99
commit 7a69dff6cf

View File

@ -106,7 +106,10 @@ public class SearchQueryIndexService {
String path = url.path;
if (topdomain.equals("fandom.com")) {
return new EdgeUrl("https", new EdgeDomain("breezewiki.com"), null, "/" + subdomain + path, null);
int wikiIndex = path.indexOf("/wiki/");
if (wikiIndex >= 0) {
return new EdgeUrl("https", new EdgeDomain("breezewiki.com"), null, "/" + subdomain + path.substring(wikiIndex), null);
}
}
else if (topdomain.equals("medium.com")) {
if (!subdomain.isBlank()) {