From d968ac7114fa45467bd3e26563d89c2030619056 Mon Sep 17 00:00:00 2001 From: kelson42 Date: Fri, 16 Jul 2010 18:14:32 +0000 Subject: [PATCH] =?UTF-8?q?+=20add=20a=20stub=20HTML=20header/footer=20if?= =?UTF-8?q?=20the=20content=20only=20have=20the=20=20.--Cette=20lign?= =?UTF-8?q?e,=20et=20les=20suivantes=20ci-dessous,=20seront=20ignor=C3=A9e?= =?UTF-8?q?s--?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit M reader.cpp --- src/common/kiwix/reader.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/common/kiwix/reader.cpp b/src/common/kiwix/reader.cpp index 4569720d4..5a654c1e7 100644 --- a/src/common/kiwix/reader.cpp +++ b/src/common/kiwix/reader.cpp @@ -166,10 +166,16 @@ namespace kiwix { /* Get the data */ 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("")) { + cout << content << endl; + content = "" + article.getTitle() + "" + content + ""; + } /* Get the data length */ contentLength = article.getArticleSize(); - + /* Set return value */ retVal = true; } else {