X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fhtml_parser.cpp;h=95db7c7fd41993645193ba617e1d5404993a8307;hb=dcb3c31dc44aa5b29981d1accf6ed23190f1c3f9;hp=3f1a4f4fdba224f819527b7b0c612f631d0b5bc8;hpb=489bd9188aed44d93c29f996311e0477152d592a;p=metaproxy-moved-to-github.git diff --git a/src/html_parser.cpp b/src/html_parser.cpp index 3f1a4f4..95db7c7 100644 --- a/src/html_parser.cpp +++ b/src/html_parser.cpp @@ -1,5 +1,5 @@ /* This file is part of Metaproxy. - Copyright (C) 2005-2013 Index Data + Copyright (C) Index Data Metaproxy is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -166,8 +166,12 @@ int mp::HTMLParser::Rep::tagAttrs(HTMLParserEvent &event, x[0] = tr; x[1] = 0; if (m_verbose) - printf ("------ attr %.*s=%.*s\n", attr_len, attr_name, - val_len, value); + { + printf("------ attr %.*s", attr_len, attr_name); + if (value) + printf("=%.*s", val_len, value); + printf("\n"); + } event.attribute(name, len, attr_name, attr_len, value, val_len, x); } return i; @@ -195,7 +199,7 @@ int mp::HTMLParser::Rep::tagEnd(HTMLParserEvent &event, { if (m_verbose) printf("------ any tag %s %.*s\n", - close_it ? " close" : "end", tag_len, tag); + close_it ? "close" : "end", tag_len, tag); event.anyTagEnd(tag, tag_len, close_it); i++; }