X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fhtml_parser.cpp;h=fba55951b2a9e8d7c8f57a0e3bb89db675bac858;hb=2ee83c18eef23c98fd4e97d581401be193fdf41f;hp=a720c5622f69894936a3d40189f67ea462054c64;hpb=b8f4ac1af9456465a24ecd338fd998e292030abf;p=metaproxy-moved-to-github.git diff --git a/src/html_parser.cpp b/src/html_parser.cpp index a720c56..fba5595 100644 --- a/src/html_parser.cpp +++ b/src/html_parser.cpp @@ -95,7 +95,7 @@ static int skipSpace(const char *cp) static int skipName(const char *cp) { int i; - for (i = 0; cp[i] && !strchr(SPACECHR "/>=", cp[i]); i++) + for (i = 0; cp[i] && !strchr(SPACECHR "/>=<", cp[i]); i++) ; return i; } @@ -146,7 +146,7 @@ int mp::HTMLParser::Rep::tagAttrs(HTMLParserEvent &event, const char *cp) { int i = skipSpace(cp); - while (cp[i] && cp[i] != '>' && cp[i] != '/') + while (cp[i] && cp[i] != '>' && cp[i] != '/' && cp[i] != '<') { const char *attr_name = cp + i; int attr_len; @@ -174,7 +174,7 @@ int mp::HTMLParser::Rep::tagEnd(HTMLParserEvent &event, { int i = 0; int close_it = 0; - for (; cp[i] && cp[i] != '/' && cp[i] != '>'; i++) + for (; cp[i] && cp[i] != '/' && cp[i] != '>' && cp[i] != '<'; i++) ; if (i > 0) { @@ -287,6 +287,10 @@ void mp::HTMLParser::Rep::parse_str(HTMLParserEvent &event, const char *cp) tagText(event, text_start, cp); } +mp::HTMLParserEvent::~HTMLParserEvent() +{ +} + /* * Local variables: * c-basic-offset: 4