-class MyEvent : public mp::HTMLParserEvent {
- public:
- std::string out;
- void openTagStart(const char *name)
- {
- out += "<";
- out += name;
- }
-
- void attribute(const char *tagName,
- const char *name, const char *value, int val_len)
+class MyEvent : public mp::HTMLParserEvent
+{
+public:
+ std::string out;
+ void openTagStart(const char *tag, int tag_len) {
+ out += "<";
+ out.append(tag, tag_len);
+ }
+
+ void attribute(const char *tag, int tag_len,
+ const char *attr, int attr_len,
+ const char *value, int val_len, const char *sep) {
+ out += " ";
+ out.append(attr, attr_len);
+ if (value)