fix nasty html parse bug introduced in 1.0.9
This commit is contained in:
parent
7f76993209
commit
d2b54d6af2
@ -1 +1 @@
|
|||||||
1.0.11
|
1.0.12
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "@(#$Id: internfile.cpp,v 1.11 2005-11-24 07:16:15 dockes Exp $ (C) 2004 J.F.Dockes";
|
static char rcsid[] = "@(#$Id: internfile.cpp,v 1.12 2005-12-06 08:35:48 dockes Exp $ (C) 2004 J.F.Dockes";
|
||||||
#endif
|
#endif
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -161,7 +161,9 @@ FileInterner::Status FileInterner::internfile(Rcl::Doc& doc, string& ipath)
|
|||||||
m_handler->mkDoc(m_cfg, m_fn, m_mime, doc, ipath);
|
m_handler->mkDoc(m_cfg, m_fn, m_mime, doc, ipath);
|
||||||
FileInterner::Status ret = FIError;
|
FileInterner::Status ret = FIError;
|
||||||
switch (mhs) {
|
switch (mhs) {
|
||||||
case MimeHandler::MHError: break;
|
case MimeHandler::MHError:
|
||||||
|
LOGERR(("FileInterner::internfile: error parsing %s\n", m_fn.c_str()));
|
||||||
|
break;
|
||||||
case MimeHandler::MHDone: ret = FIDone;break;
|
case MimeHandler::MHDone: ret = FIDone;break;
|
||||||
case MimeHandler::MHAgain: ret = FIAgain;break;
|
case MimeHandler::MHAgain: ret = FIAgain;break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -108,8 +108,10 @@ MimeHandlerHtml::mkDoc(RclConfig *conf, const string &,
|
|||||||
LOGDEB(("textHtmlToDoc: charset '%s' doc charset '%s',"
|
LOGDEB(("textHtmlToDoc: charset '%s' doc charset '%s',"
|
||||||
"reparse\n", charset.c_str(),pres.doccharset.c_str()));
|
"reparse\n", charset.c_str(),pres.doccharset.c_str()));
|
||||||
charset = pres.doccharset;
|
charset = pres.doccharset;
|
||||||
} else
|
} else {
|
||||||
break;
|
LOGERR(("textHtmlToDoc:: error: non charset exception\n"));
|
||||||
|
return MimeHandler::MHError;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -24,10 +24,9 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "myhtmlparse.h"
|
#include "myhtmlparse.h"
|
||||||
|
|
||||||
#include "indextext.h" // for lowercase_term()
|
#include "indextext.h" // for lowercase_term()
|
||||||
|
|
||||||
#include "mimeparse.h"
|
#include "mimeparse.h"
|
||||||
|
#include "smallut.h"
|
||||||
|
|
||||||
// The original version for this compresses whitespace and suppresses newlines
|
// The original version for this compresses whitespace and suppresses newlines
|
||||||
// I can see no good reason to do this, and it actually helps preview to keep
|
// I can see no good reason to do this, and it actually helps preview to keep
|
||||||
@ -171,7 +170,7 @@ MyHtmlParser::opening_tag(const string &tag, const map<string,string> &p)
|
|||||||
if ((k = p.params.find("charset")) !=
|
if ((k = p.params.find("charset")) !=
|
||||||
p.params.end()) {
|
p.params.end()) {
|
||||||
doccharset = k->second;
|
doccharset = k->second;
|
||||||
if (doccharset != ocharset) {
|
if (!samecharset(doccharset, ocharset)) {
|
||||||
LOGDEB1(("Doc specified charset '%s' "
|
LOGDEB1(("Doc specified charset '%s' "
|
||||||
"differs from announced '%s'\n",
|
"differs from announced '%s'\n",
|
||||||
doccharset.c_str(),
|
doccharset.c_str(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user