diff --git a/src/server/kiwix-serve.cpp b/src/server/kiwix-serve.cpp index d9959a6..450b795 100644 --- a/src/server/kiwix-serve.cpp +++ b/src/server/kiwix-serve.cpp @@ -192,7 +192,7 @@ static int accessHandlerCallback(void *cls, } /* Rewrite the content (add the search box) */ - if (hasSearchIndex && mimeType.find("text/html")) { + if (hasSearchIndex && mimeType.find("text/html") != string::npos) { appendToFirstOccurence(content, "", HTMLScripts); appendToFirstOccurence(content, "]*>", HTMLDiv); contentLength = content.size();