From d6d7274b0ffc3431caf477d309b0dfb1ac9228e2 Mon Sep 17 00:00:00 2001 From: kelson42 Date: Sat, 19 Jul 2014 19:29:51 +0200 Subject: [PATCH] + Fix code in ZIM reader class breaking DOM integrity --- src/common/kiwix/reader.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/kiwix/reader.cpp b/src/common/kiwix/reader.cpp index be99bdbe4..1b25c2712 100644 --- a/src/common/kiwix/reader.cpp +++ b/src/common/kiwix/reader.cpp @@ -431,7 +431,9 @@ namespace kiwix { content = string(article.getData().data(), article.getArticleSize()); /* Try to set a stub HTML header/footer if necesssary */ - if (contentType == "text/html" && std::string::npos == content.find("")) { + if (contentType.find("text/html") != string::npos && + content.find("" + content + ""; }