|
a/src/internfile/myhtmlparse.cpp |
|
b/src/internfile/myhtmlparse.cpp |
|
... |
|
... |
25 |
#include <time.h>
|
25 |
#include <time.h>
|
26 |
#include <stdio.h>
|
26 |
#include <stdio.h>
|
27 |
#include <algorithm>
|
27 |
#include <algorithm>
|
28 |
#include <cstring>
|
28 |
#include <cstring>
|
29 |
|
29 |
|
|
|
30 |
#include "cstr.h"
|
30 |
#include "myhtmlparse.h"
|
31 |
#include "myhtmlparse.h"
|
31 |
#include "indextext.h" // for lowercase_term()
|
32 |
#include "indextext.h" // for lowercase_term()
|
32 |
#include "mimeparse.h"
|
33 |
#include "mimeparse.h"
|
33 |
#include "smallut.h"
|
34 |
#include "smallut.h"
|
34 |
#include "cancelcheck.h"
|
35 |
#include "cancelcheck.h"
|
|
... |
|
... |
350 |
}
|
351 |
}
|
351 |
break;
|
352 |
break;
|
352 |
case 'm':
|
353 |
case 'm':
|
353 |
if (tag == "meta") {
|
354 |
if (tag == "meta") {
|
354 |
string content;
|
355 |
string content;
|
355 |
if (get_parameter("content", content)) {
|
356 |
if (get_parameter(cstr_content, content)) {
|
356 |
string name;
|
357 |
string name;
|
357 |
if (get_parameter("name", name)) {
|
358 |
if (get_parameter("name", name)) {
|
358 |
lowercase_term(name);
|
359 |
lowercase_term(name);
|
359 |
if (name == "date") {
|
360 |
if (name == "date") {
|
360 |
// Yes this doesnt exist. It's output by filters
|
361 |
// Yes this doesnt exist. It's output by filters
|
|
... |
|
... |
384 |
lowercase_term(hdr);
|
385 |
lowercase_term(hdr);
|
385 |
if (hdr == "content-type") {
|
386 |
if (hdr == "content-type") {
|
386 |
MimeHeaderValue p;
|
387 |
MimeHeaderValue p;
|
387 |
parseMimeHeaderValue(content, p);
|
388 |
parseMimeHeaderValue(content, p);
|
388 |
map<string, string>::const_iterator k;
|
389 |
map<string, string>::const_iterator k;
|
389 |
if ((k = p.params.find("charset")) !=
|
390 |
if ((k = p.params.find(cstr_charset)) !=
|
390 |
p.params.end()) {
|
391 |
p.params.end()) {
|
391 |
charset = k->second;
|
392 |
charset = k->second;
|
392 |
if (!samecharset(charset, fromcharset)) {
|
393 |
if (!samecharset(charset, fromcharset)) {
|
393 |
LOGDEB1(("Doc specified charset '%s' "
|
394 |
LOGDEB1(("Doc specified charset '%s' "
|
394 |
"differs from dir deflt '%s'\n",
|
395 |
"differs from dir deflt '%s'\n",
|
|
... |
|
... |
515 |
break;
|
516 |
break;
|
516 |
case 't':
|
517 |
case 't':
|
517 |
if (tag == "title") {
|
518 |
if (tag == "title") {
|
518 |
if (meta.find("title") == meta.end()|| meta["title"].empty()) {
|
519 |
if (meta.find("title") == meta.end()|| meta["title"].empty()) {
|
519 |
meta["title"] = dump;
|
520 |
meta["title"] = dump;
|
520 |
dump = "";
|
521 |
dump.clear();
|
521 |
}
|
522 |
}
|
522 |
break;
|
523 |
break;
|
523 |
}
|
524 |
}
|
524 |
if (tag == "table" || tag == "td" || tag == "textarea" ||
|
525 |
if (tag == "table" || tag == "td" || tag == "textarea" ||
|
525 |
tag == "th") pending_space = true;
|
526 |
tag == "th") pending_space = true;
|