Recognize all <meta> tags, not just one.
Index: html2text/HTMLParser.C
===================================================================
--- html2text.orig/HTMLParser.C
+++ html2text/HTMLParser.C
@@ -911,28 +911,28 @@ static const short yyrhs[] = {   132,
 #if YY_HTMLParser_DEBUG != 0
 static const short yyrline[] = { 0,
    273,   304,   309,   312,   315,   319,   322,   326,   329,   333,
-   336,   339,   342,   345,   353,   361,   365,   368,   373,   376,
-   379,   384,   392,   396,   399,   407,   415,   420,   423,   426,
-   431,   442,   446,   454,   458,   461,   466,   471,   475,   478,
-   481,   487,   493,   499,   505,   510,   519,   520,   527,   527,
-   534,   534,   541,   541,   550,   554,   557,   563,   570,   575,
-   582,   591,   600,   604,   607,   611,   617,   623,   631,   637,
-   645,   650,   653,   658,   662,   665,   670,   678,   686,   690,
-   693,   701,   705,   708,   714,   721,   727,   737,   742,   747,
-   749,   750,   751,   752,   753,   761,   763,   764,   765,   766,
-   767,   768,   769,   770,   773,   775,   776,   777,   778,   779,
-   780,   781,   784,   795,   800,   808,   814,   819,   824,   832,
-   836,   840,   848,   852,   855,   861,   867,   873,   881,   886,
-   891,   901,   903,   904,   905,   906,   907,   910,   912,   913,
-   914,   915,   916,   921,   921,   922,   922,   923,   923,   924,
-   924,   926,   926,   927,   927,   929,   929,   930,   930,   931,
-   931,   932,   932,   933,   933,   934,   934,   935,   935,   936,
-   936,   937,   937,   938,   938,   939,   939,   940,   940,   941,
-   941,   942,   942,   943,   943,   944,   944,   945,   945,   946,
-   946,   947,   947,   948,   948,   949,   949,   950,   950,   951,
-   951,   952,   952,   953,   953,   954,   954,   955,   955,   956,
-   956,   957,   957,   958,   958,   959,   959,   960,   960,   961,
-   961,   963,   963
+   336,   339,   344,   347,   355,   363,   367,   370,   375,   378,
+   381,   386,   394,   398,   401,   409,   417,   422,   425,   428,
+   433,   444,   448,   456,   460,   463,   468,   473,   477,   480,
+   483,   489,   495,   501,   507,   512,   521,   522,   529,   529,
+   536,   536,   543,   543,   552,   556,   559,   565,   572,   577,
+   584,   593,   602,   606,   609,   613,   619,   625,   633,   639,
+   647,   652,   655,   660,   664,   667,   672,   680,   688,   692,
+   695,   703,   707,   710,   716,   723,   729,   739,   744,   749,
+   751,   752,   753,   754,   755,   763,   765,   766,   767,   768,
+   769,   770,   771,   772,   775,   777,   778,   779,   780,   781,
+   782,   783,   786,   797,   802,   810,   816,   821,   826,   834,
+   838,   842,   850,   854,   857,   863,   869,   875,   883,   888,
+   893,   903,   905,   906,   907,   908,   909,   912,   914,   915,
+   916,   917,   918,   923,   923,   924,   924,   925,   925,   926,
+   926,   928,   928,   929,   929,   931,   931,   932,   932,   933,
+   933,   934,   934,   935,   935,   936,   936,   937,   937,   938,
+   938,   939,   939,   940,   940,   941,   941,   942,   942,   943,
+   943,   944,   944,   945,   945,   946,   946,   947,   947,   948,
+   948,   949,   949,   950,   950,   951,   951,   952,   952,   953,
+   953,   954,   954,   955,   955,   956,   956,   957,   957,   958,
+   958,   959,   959,   960,   960,   961,   961,   962,   962,   963,
+   963,   965,   965
 };
 
 static const char * const yytname[] = {   "$","error","$illegal.","DOCTYPE",
@@ -2044,17 +2044,19 @@ case 11:
 case 12:
 #line 339 "HTMLParser.y"
 {
-    (yyval.document = yyvsp[-1].document)->head.meta_attributes.reset(yyvsp[0].tag_attributes);
+    auto_ptr<Meta> s(new Meta);
+    s->attributes.reset(yyvsp[0].tag_attributes);
+    (yyval.document = yyvsp[-1].document)->head.metas.push_back(s);
   ;
     break;}
 case 13:
-#line 342 "HTMLParser.y"
+#line 344 "HTMLParser.y"
 {
     (yyval.document = yyvsp[-1].document)->head.link_attributes.reset(yyvsp[0].tag_attributes);
   ;
     break;}
 case 14:
-#line 345 "HTMLParser.y"
+#line 347 "HTMLParser.y"
 {
     auto_ptr<Script> s(new Script);
     s->attributes.reset(yyvsp[0].tag_attributes);
@@ -2065,7 +2067,7 @@ case 14:
   ;
     break;}
 case 15:
-#line 353 "HTMLParser.y"
+#line 355 "HTMLParser.y"
 {
     auto_ptr<Style> s(new Style);
     s->attributes.reset(yyvsp[0].tag_attributes);
@@ -2076,20 +2078,20 @@ case 15:
   ;
     break;}
 case 16:
-#line 361 "HTMLParser.y"
+#line 363 "HTMLParser.y"
 {
     delete yyvsp[0].tag_attributes;
     yyval.document = yyvsp[-1].document;
   ;
     break;}
 case 17:
-#line 365 "HTMLParser.y"
+#line 367 "HTMLParser.y"
 {
     yyval.document = yyvsp[-1].document;
   ;
     break;}
 case 18:
-#line 368 "HTMLParser.y"
+#line 370 "HTMLParser.y"
 {
     Paragraph *p = new Paragraph;
     p->texts.reset(yyvsp[0].element_list);
@@ -2097,25 +2099,25 @@ case 18:
   ;
     break;}
 case 19:
-#line 373 "HTMLParser.y"
+#line 375 "HTMLParser.y"
 {
     (yyval.document = yyvsp[-1].document)->body.content->push_back(auto_ptr<Element>(yyvsp[0].heading));
   ;
     break;}
 case 20:
-#line 376 "HTMLParser.y"
+#line 378 "HTMLParser.y"
 {
     (yyval.document = yyvsp[-1].document)->body.content->push_back(auto_ptr<Element>(yyvsp[0].element));
   ;
     break;}
 case 21:
-#line 379 "HTMLParser.y"
+#line 381 "HTMLParser.y"
 {
     (yyval.document = yyvsp[-1].document)->body.content->push_back(auto_ptr<Element>(yyvsp[0].address));
   ;
     break;}
 case 22:
-#line 385 "HTMLParser.y"
+#line 387 "HTMLParser.y"
 {
     yyval.pcdata = new PCData;
     yyval.pcdata->text = *yyvsp[0].strinG;
@@ -2123,19 +2125,19 @@ case 22:
   ;
     break;}
 case 23:
-#line 393 "HTMLParser.y"
+#line 395 "HTMLParser.y"
 {
     yyval.element_list = new list<auto_ptr<Element> >;
   ;
     break;}
 case 24:
-#line 396 "HTMLParser.y"
+#line 398 "HTMLParser.y"
 {
     yyval.element_list = yyvsp[-1].element_list;
   ;
     break;}
 case 25:
-#line 399 "HTMLParser.y"
+#line 401 "HTMLParser.y"
 {
     auto_ptr<Script> s(new Script);
     s->attributes.reset(yyvsp[0].tag_attributes);
@@ -2146,7 +2148,7 @@ case 25:
   ;
     break;}
 case 26:
-#line 407 "HTMLParser.y"
+#line 409 "HTMLParser.y"
 {
     auto_ptr<Style> s(new Style);
     s->attributes.reset(yyvsp[0].tag_attributes);
@@ -2157,7 +2159,7 @@ case 26:
   ;
     break;}
 case 27:
-#line 415 "HTMLParser.y"
+#line 417 "HTMLParser.y"
 {
     Paragraph *p = new Paragraph;
     p->texts = auto_ptr<list<auto_ptr<Element> > >(yyvsp[0].element_list);
@@ -2165,25 +2167,25 @@ case 27:
   ;
     break;}
 case 28:
-#line 420 "HTMLParser.y"
+#line 422 "HTMLParser.y"
 {
     (yyval.element_list = yyvsp[-1].element_list)->push_back(auto_ptr<Element>(yyvsp[0].heading));
   ;
     break;}
 case 29:
-#line 423 "HTMLParser.y"
+#line 425 "HTMLParser.y"
 {
     (yyval.element_list = yyvsp[-1].element_list)->push_back(auto_ptr<Element>(yyvsp[0].element));
   ;
     break;}
 case 30:
-#line 426 "HTMLParser.y"
+#line 428 "HTMLParser.y"
 {
     (yyval.element_list = yyvsp[-1].element_list)->push_back(auto_ptr<Element>(yyvsp[0].address));
   ;
     break;}
 case 31:
-#line 432 "HTMLParser.y"
+#line 434 "HTMLParser.y"
 {
             /* EXTENSION: Allow paragraph content in heading, not only texts */
     if (yyvsp[-2].heading->level != yyvsp[0].inT) {
@@ -2194,13 +2196,13 @@ case 31:
   ;
     break;}
 case 32:
-#line 443 "HTMLParser.y"
+#line 445 "HTMLParser.y"
 {
     yyval.element = yyvsp[0].element;
   ;
     break;}
 case 33:
-#line 446 "HTMLParser.y"
+#line 448 "HTMLParser.y"
 {
     Paragraph *p = new Paragraph;
     p->attributes.reset(yyvsp[-2].tag_attributes);
@@ -2209,19 +2211,19 @@ case 33:
   ;
     break;}
 case 34:
-#line 455 "HTMLParser.y"
+#line 457 "HTMLParser.y"
 {
     yyval.element_list = new list<auto_ptr<Element> >;
   ;
     break;}
 case 35:
-#line 458 "HTMLParser.y"
+#line 460 "HTMLParser.y"
 {
     yyval.element_list = yyvsp[-1].element_list;
   ;
     break;}
 case 36:
-#line 461 "HTMLParser.y"
+#line 463 "HTMLParser.y"
 {
     yyval.element_list = yyvsp[-1].element_list;
     yyval.element_list->splice(yyval.element_list->end(), *yyvsp[0].element_list);
@@ -2229,31 +2231,31 @@ case 36:
   ;
     break;}
 case 37:
-#line 466 "HTMLParser.y"
+#line 468 "HTMLParser.y"
 {
     (yyval.element_list = yyvsp[-1].element_list)->push_back(auto_ptr<Element>(yyvsp[0].element));
   ;
     break;}
 case 38:
-#line 472 "HTMLParser.y"
+#line 474 "HTMLParser.y"
 {
     yyval.element = yyvsp[0].element;
   ;
     break;}
 case 39:
-#line 475 "HTMLParser.y"
+#line 477 "HTMLParser.y"
 {
     yyval.element = yyvsp[0].preformatted;
   ;
     break;}
 case 40:
-#line 478 "HTMLParser.y"
+#line 480 "HTMLParser.y"
 {
     yyval.element = yyvsp[0].definition_list;
   ;
     break;}
 case 41:
-#line 481 "HTMLParser.y"
+#line 483 "HTMLParser.y"
 {
     Division *p = new Division;
     p->attributes.reset(yyvsp[-2].tag_attributes);
@@ -2262,7 +2264,7 @@ case 41:
   ;
     break;}
 case 42:
-#line 487 "HTMLParser.y"
+#line 489 "HTMLParser.y"
 {
     Center *p = new Center;
     delete yyvsp[-2].tag_attributes;       // CENTER has no attributes.
@@ -2271,7 +2273,7 @@ case 42:
   ;
     break;}
 case 43:
-#line 493 "HTMLParser.y"
+#line 495 "HTMLParser.y"
 {
     delete yyvsp[-2].tag_attributes; // BLOCKQUOTE has no attributes!
     BlockQuote *bq = new BlockQuote;
@@ -2280,7 +2282,7 @@ case 43:
   ;
     break;}
 case 44:
-#line 499 "HTMLParser.y"
+#line 501 "HTMLParser.y"
 {
     Form *f = new Form;
     f->attributes.reset(yyvsp[-2].tag_attributes);
@@ -2289,7 +2291,7 @@ case 44:
   ;
     break;}
 case 45:
-#line 505 "HTMLParser.y"
+#line 507 "HTMLParser.y"
 {
     HorizontalRule *h = new HorizontalRule;
     h->attributes.reset(yyvsp[0].tag_attributes);
@@ -2297,7 +2299,7 @@ case 45:
   ;
     break;}
 case 46:
-#line 510 "HTMLParser.y"
+#line 512 "HTMLParser.y"
 {
     Table *t = new Table;
     t->attributes.reset(yyvsp[-3].tag_attributes);
@@ -2307,11 +2309,11 @@ case 46:
   ;
     break;}
 case 47:
-#line 520 "HTMLParser.y"
+#line 522 "HTMLParser.y"
 { ++list_nesting; ;
     break;}
 case 48:
-#line 520 "HTMLParser.y"
+#line 522 "HTMLParser.y"
 {
     OrderedList *ol = new OrderedList;
     ol->attributes.reset(yyvsp[-3].tag_attributes);
@@ -2321,11 +2323,11 @@ case 48:
   ;
     break;}
 case 49:
-#line 527 "HTMLParser.y"
+#line 529 "HTMLParser.y"
 { ++list_nesting; ;
     break;}
 case 50:
-#line 527 "HTMLParser.y"
+#line 529 "HTMLParser.y"
 {
     UnorderedList *ul = new UnorderedList;
     ul->attributes.reset(yyvsp[-3].tag_attributes);
@@ -2335,11 +2337,11 @@ case 50:
   ;
     break;}
 case 51:
-#line 534 "HTMLParser.y"
+#line 536 "HTMLParser.y"
 { ++list_nesting; ;
     break;}
 case 52:
-#line 534 "HTMLParser.y"
+#line 536 "HTMLParser.y"
 {
     Dir *d = new Dir;
     d->attributes.reset(yyvsp[-3].tag_attributes);
@@ -2349,11 +2351,11 @@ case 52:
   ;
     break;}
 case 53:
-#line 541 "HTMLParser.y"
+#line 543 "HTMLParser.y"
 { ++list_nesting; ;
     break;}
 case 54:
-#line 541 "HTMLParser.y"
+#line 543 "HTMLParser.y"
 {
     Menu *m = new Menu;
     m->attributes.reset(yyvsp[-3].tag_attributes);
@@ -2363,26 +2365,26 @@ case 54:
   ;
     break;}
 case 55:
-#line 551 "HTMLParser.y"
+#line 553 "HTMLParser.y"
 {
     yyval.list_items = 0;
   ;
     break;}
 case 56:
-#line 554 "HTMLParser.y"
+#line 556 "HTMLParser.y"
 {
     yyval.list_items = yyvsp[-1].list_items;
   ;
     break;}
 case 57:
-#line 557 "HTMLParser.y"
+#line 559 "HTMLParser.y"
 {
     yyval.list_items = yyvsp[-1].list_items ? yyvsp[-1].list_items : new list<auto_ptr<ListItem> >;
     yyval.list_items->push_back(auto_ptr<ListItem>(yyvsp[0].list_item));
   ;
     break;}
 case 58:
-#line 564 "HTMLParser.y"
+#line 566 "HTMLParser.y"
 {
     ListNormalItem *lni = new ListNormalItem;
     lni->attributes.reset(yyvsp[-2].tag_attributes);
@@ -2391,7 +2393,7 @@ case 58:
   ;
     break;}
 case 59:
-#line 570 "HTMLParser.y"
+#line 572 "HTMLParser.y"
 {   /* EXTENSION: Handle a "block" in a list as an indented block. */
     ListBlockItem *lbi = new ListBlockItem;
     lbi->block.reset(yyvsp[0].element);
@@ -2399,7 +2401,7 @@ case 59:
   ;
     break;}
 case 60:
-#line 575 "HTMLParser.y"
+#line 577 "HTMLParser.y"
 {              /* EXTENSION: Treat "texts" in a list as an "<LI>". */
     ListNormalItem *lni = new ListNormalItem;
     lni->flow.reset(yyvsp[0].element_list);
@@ -2407,7 +2409,7 @@ case 60:
   ;
     break;}
 case 61:
-#line 585 "HTMLParser.y"
+#line 587 "HTMLParser.y"
 {
     delete yyvsp[-4].tag_attributes;
     delete yyvsp[-3].element_list; /* Kludge */
@@ -2415,7 +2417,7 @@ case 61:
   ;
     break;}
 case 62:
-#line 591 "HTMLParser.y"
+#line 593 "HTMLParser.y"
 {
     DefinitionList *dl = new DefinitionList;
     dl->attributes.reset(yyvsp[-4].tag_attributes);
@@ -2425,33 +2427,33 @@ case 62:
   ;
     break;}
 case 63:
-#line 601 "HTMLParser.y"
+#line 603 "HTMLParser.y"
 {
     yyval.definition_list_item_list = 0;
   ;
     break;}
 case 64:
-#line 604 "HTMLParser.y"
+#line 606 "HTMLParser.y"
 {
     yyval.definition_list_item_list = yyvsp[0].definition_list_item_list;
   ;
     break;}
 case 65:
-#line 607 "HTMLParser.y"
+#line 609 "HTMLParser.y"
 {
     yyval.definition_list_item_list = yyvsp[-1].definition_list_item_list ? yyvsp[-1].definition_list_item_list : new list<auto_ptr<DefinitionListItem> >;
     yyval.definition_list_item_list->push_back(auto_ptr<DefinitionListItem>(yyvsp[0].term_name));
   ;
     break;}
 case 66:
-#line 611 "HTMLParser.y"
+#line 613 "HTMLParser.y"
 {
     yyval.definition_list_item_list = yyvsp[-1].definition_list_item_list ? yyvsp[-1].definition_list_item_list : new list<auto_ptr<DefinitionListItem> >;
     yyval.definition_list_item_list->push_back(auto_ptr<DefinitionListItem>(yyvsp[0].term_definition));
   ;
     break;}
 case 67:
-#line 618 "HTMLParser.y"
+#line 620 "HTMLParser.y"
 {      /* EXTENSION: Allow "flow" instead of "texts" */
     delete yyvsp[-2].tag_attributes;
     yyval.term_name = new TermName;
@@ -2459,7 +2461,7 @@ case 67:
   ;
     break;}
 case 68:
-#line 623 "HTMLParser.y"
+#line 625 "HTMLParser.y"
 {/* EXTENSION: Ignore <P> after </DT> */
     delete yyvsp[-4].tag_attributes;
     delete yyvsp[-1].tag_attributes;
@@ -2468,7 +2470,7 @@ case 68:
   ;
     break;}
 case 69:
-#line 632 "HTMLParser.y"
+#line 634 "HTMLParser.y"
 {
     delete yyvsp[-2].tag_attributes;
     yyval.term_definition = new TermDefinition;
@@ -2476,7 +2478,7 @@ case 69:
   ;
     break;}
 case 70:
-#line 637 "HTMLParser.y"
+#line 639 "HTMLParser.y"
 {/* EXTENSION: Ignore <P> after </DD> */
     delete yyvsp[-4].tag_attributes;
     delete yyvsp[-1].tag_attributes;
@@ -2485,44 +2487,44 @@ case 70:
   ;
     break;}
 case 71:
-#line 646 "HTMLParser.y"
+#line 648 "HTMLParser.y"
 {
     yyval.element_list = new list<auto_ptr<Element> >;
     yyval.element_list->push_back(auto_ptr<Element>(yyvsp[0].element));
   ;
     break;}
 case 72:
-#line 650 "HTMLParser.y"
+#line 652 "HTMLParser.y"
 {
     yyval.element_list = yyvsp[-1].element_list;
   ;
     break;}
 case 73:
-#line 653 "HTMLParser.y"
+#line 655 "HTMLParser.y"
 {
     (yyval.element_list = yyvsp[-1].element_list)->push_back(auto_ptr<Element>(yyvsp[0].element));
   ;
     break;}
 case 74:
-#line 659 "HTMLParser.y"
+#line 661 "HTMLParser.y"
 {
     yyval.element = yyvsp[0].element;
   ;
     break;}
 case 75:
-#line 662 "HTMLParser.y"
+#line 664 "HTMLParser.y"
 {          /* EXTENSION: Allow headings in "flow", i.e. in lists */
     yyval.element = yyvsp[0].heading;
   ;
     break;}
 case 76:
-#line 665 "HTMLParser.y"
+#line 667 "HTMLParser.y"
 {
     yyval.element = yyvsp[0].element;
   ;
     break;}
 case 77:
-#line 671 "HTMLParser.y"
+#line 673 "HTMLParser.y"
 {
     yyval.preformatted = new Preformatted;
     yyval.preformatted->attributes.reset(yyvsp[-2].tag_attributes);
@@ -2530,7 +2532,7 @@ case 77:
   ;
     break;}
 case 78:
-#line 679 "HTMLParser.y"
+#line 681 "HTMLParser.y"
 {
     yyval.caption = new Caption;
     yyval.caption->attributes.reset(yyvsp[-2].tag_attributes);
@@ -2538,19 +2540,19 @@ case 78:
   ;
     break;}
 case 79:
-#line 687 "HTMLParser.y"
+#line 689 "HTMLParser.y"
 {
     yyval.table_rows = new list<auto_ptr<TableRow> >;
   ;
     break;}
 case 80:
-#line 690 "HTMLParser.y"
+#line 692 "HTMLParser.y"
 {
     yyval.table_rows = yyvsp[-1].table_rows;
   ;
     break;}
 case 81:
-#line 693 "HTMLParser.y"
+#line 695 "HTMLParser.y"
 {
     TableRow *tr = new TableRow;
     tr->attributes.reset(yyvsp[-2].tag_attributes);
@@ -2559,19 +2561,19 @@ case 81:
   ;
     break;}
 case 82:
-#line 702 "HTMLParser.y"
+#line 704 "HTMLParser.y"
 {
     yyval.table_cells = new list<auto_ptr<TableCell> >;
   ;
     break;}
 case 83:
-#line 705 "HTMLParser.y"
+#line 707 "HTMLParser.y"
 {
     yyval.table_cells = yyvsp[-1].table_cells;
   ;
     break;}
 case 84:
-#line 708 "HTMLParser.y"
+#line 710 "HTMLParser.y"
 {
     TableCell *tc = new TableCell;
     tc->attributes.reset(yyvsp[-2].tag_attributes);
@@ -2580,7 +2582,7 @@ case 84:
   ;
     break;}
 case 85:
-#line 714 "HTMLParser.y"
+#line 716 "HTMLParser.y"
 {
                             /* EXTENSION: Allow "</TD>" in place of "</TH>". */
     TableHeadingCell *thc = new TableHeadingCell;
@@ -2590,14 +2592,14 @@ case 85:
   ;
     break;}
 case 86:
-#line 721 "HTMLParser.y"
+#line 723 "HTMLParser.y"
 {    /* EXTENSION: Ignore <INPUT> between table cells. */
     delete yyvsp[0].tag_attributes;
     yyval.table_cells = yyvsp[-1].table_cells;
   ;
     break;}
 case 87:
-#line 728 "HTMLParser.y"
+#line 730 "HTMLParser.y"
 { /* Should be "address_content"... */
     delete yyvsp[-2].tag_attributes;
     yyval.address = new Address;
@@ -2605,40 +2607,40 @@ case 87:
   ;
     break;}
 case 88:
-#line 738 "HTMLParser.y"
+#line 740 "HTMLParser.y"
 {
     yyval.element_list = new list<auto_ptr<Element> >;
     yyval.element_list->push_back(auto_ptr<Element>(yyvsp[0].element));
   ;
     break;}
 case 89:
-#line 742 "HTMLParser.y"
+#line 744 "HTMLParser.y"
 {
     (yyval.element_list = yyvsp[-1].element_list)->push_back(auto_ptr<Element>(yyvsp[0].element));
   ;
     break;}
 case 90:
-#line 748 "HTMLParser.y"
+#line 750 "HTMLParser.y"
 { yyval.element = yyvsp[-1].pcdata; ;
     break;}
 case 91:
-#line 749 "HTMLParser.y"
+#line 751 "HTMLParser.y"
 { yyval.element = yyvsp[-1].element; ;
     break;}
 case 92:
-#line 750 "HTMLParser.y"
+#line 752 "HTMLParser.y"
 { yyval.element = yyvsp[-1].element; ;
     break;}
 case 93:
-#line 751 "HTMLParser.y"
+#line 753 "HTMLParser.y"
 { yyval.element = yyvsp[-1].element; ;
     break;}
 case 94:
-#line 752 "HTMLParser.y"
+#line 754 "HTMLParser.y"
 { yyval.element = yyvsp[-1].element; ;
     break;}
 case 95:
-#line 753 "HTMLParser.y"
+#line 755 "HTMLParser.y"
 { /* EXTENSION: NS 1.1 / IE 2.0 */
     NoBreak *nb = new NoBreak;
     delete yyvsp[-3].tag_attributes;
@@ -2647,75 +2649,75 @@ case 95:
   ;
     break;}
 case 96:
-#line 762 "HTMLParser.y"
+#line 764 "HTMLParser.y"
 { delete yyvsp[-2].tag_attributes; yyval.element = new Font(TT,     yyvsp[-1].element_list); ;
     break;}
 case 97:
-#line 763 "HTMLParser.y"
+#line 765 "HTMLParser.y"
 { delete yyvsp[-2].tag_attributes; yyval.element = new Font(I,      yyvsp[-1].element_list); ;
     break;}
 case 98:
-#line 764 "HTMLParser.y"
+#line 766 "HTMLParser.y"
 { delete yyvsp[-2].tag_attributes; yyval.element = new Font(B,      yyvsp[-1].element_list); ;
     break;}
 case 99:
-#line 765 "HTMLParser.y"
+#line 767 "HTMLParser.y"
 { delete yyvsp[-2].tag_attributes; yyval.element = new Font(U,      yyvsp[-1].element_list); ;
     break;}
 case 100:
-#line 766 "HTMLParser.y"
+#line 768 "HTMLParser.y"
 { delete yyvsp[-2].tag_attributes; yyval.element = new Font(STRIKE, yyvsp[-1].element_list); ;
     break;}
 case 101:
-#line 767 "HTMLParser.y"
+#line 769 "HTMLParser.y"
 { delete yyvsp[-2].tag_attributes; yyval.element = new Font(BIG,    yyvsp[-1].element_list); ;
     break;}
 case 102:
-#line 768 "HTMLParser.y"
+#line 770 "HTMLParser.y"
 { delete yyvsp[-2].tag_attributes; yyval.element = new Font(SMALL,  yyvsp[-1].element_list); ;
     break;}
 case 103:
-#line 769 "HTMLParser.y"
+#line 771 "HTMLParser.y"
 { delete yyvsp[-2].tag_attributes; yyval.element = new Font(SUB,    yyvsp[-1].element_list); ;
     break;}
 case 104:
-#line 770 "HTMLParser.y"
+#line 772 "HTMLParser.y"
 { delete yyvsp[-2].tag_attributes; yyval.element = new Font(SUP,    yyvsp[-1].element_list); ;
     break;}
 case 105:
-#line 774 "HTMLParser.y"
+#line 776 "HTMLParser.y"
 { delete yyvsp[-2].tag_attributes; yyval.element = new Phrase(EM,     yyvsp[-1].element_list); ;
     break;}
 case 106:
-#line 775 "HTMLParser.y"
+#line 777 "HTMLParser.y"
 { delete yyvsp[-2].tag_attributes; yyval.element = new Phrase(STRONG, yyvsp[-1].element_list); ;
     break;}
 case 107:
-#line 776 "HTMLParser.y"
+#line 778 "HTMLParser.y"
 { delete yyvsp[-2].tag_attributes; yyval.element = new Phrase(DFN,    yyvsp[-1].element_list); ;
     break;}
 case 108:
-#line 777 "HTMLParser.y"
+#line 779 "HTMLParser.y"
 { delete yyvsp[-2].tag_attributes; yyval.element = new Phrase(CODE,   yyvsp[-1].element_list); ;
     break;}
 case 109:
-#line 778 "HTMLParser.y"
+#line 780 "HTMLParser.y"
 { delete yyvsp[-2].tag_attributes; yyval.element = new Phrase(SAMP,   yyvsp[-1].element_list); ;
     break;}
 case 110:
-#line 779 "HTMLParser.y"
+#line 781 "HTMLParser.y"
 { delete yyvsp[-2].tag_attributes; yyval.element = new Phrase(KBD,    yyvsp[-1].element_list); ;
     break;}
 case 111:
-#line 780 "HTMLParser.y"
+#line 782 "HTMLParser.y"
 { delete yyvsp[-2].tag_attributes; yyval.element = new Phrase(VAR,    yyvsp[-1].element_list); ;
     break;}
 case 112:
-#line 781 "HTMLParser.y"
+#line 783 "HTMLParser.y"
 { delete yyvsp[-2].tag_attributes; yyval.element = new Phrase(CITE,   yyvsp[-1].element_list); ;
     break;}
 case 113:
-#line 788 "HTMLParser.y"
+#line 790 "HTMLParser.y"
 {
     delete yyvsp[-2].tag_attributes;
     Anchor *a = new Anchor;
@@ -2725,7 +2727,7 @@ case 113:
   ;
     break;}
 case 114:
-#line 795 "HTMLParser.y"
+#line 797 "HTMLParser.y"
 {
     Image *i = new Image;
     i->attributes.reset(yyvsp[0].tag_attributes);
@@ -2733,7 +2735,7 @@ case 114:
   ;
     break;}
 case 115:
-#line 800 "HTMLParser.y"
+#line 802 "HTMLParser.y"
 {
     Applet *a = new Applet;
     a->attributes.reset(yyvsp[-2].tag_attributes);
@@ -2742,7 +2744,7 @@ case 115:
   ;
     break;}
 case 116:
-#line 808 "HTMLParser.y"
+#line 810 "HTMLParser.y"
 {
     Font2 *f2 = new Font2;
     f2->attributes.reset(yyvsp[-2].tag_attributes);
@@ -2751,7 +2753,7 @@ case 116:
   ;
     break;}
 case 117:
-#line 814 "HTMLParser.y"
+#line 816 "HTMLParser.y"
 {
     BaseFont *bf = new BaseFont;
     bf->attributes.reset(yyvsp[0].tag_attributes);
@@ -2759,7 +2761,7 @@ case 117:
   ;
     break;}
 case 118:
-#line 819 "HTMLParser.y"
+#line 821 "HTMLParser.y"
 {
     LineBreak *lb = new LineBreak;
     lb->attributes.reset(yyvsp[0].tag_attributes);
@@ -2767,7 +2769,7 @@ case 118:
   ;
     break;}
 case 119:
-#line 824 "HTMLParser.y"
+#line 826 "HTMLParser.y"
 {
     Map *m = new Map;
     m->attributes.reset(yyvsp[-2].tag_attributes);
@@ -2776,20 +2778,20 @@ case 119:
   ;
     break;}
 case 120:
-#line 833 "HTMLParser.y"
+#line 835 "HTMLParser.y"
 {
     yyval.element_list = 0;
   ;
     break;}
 case 121:
-#line 836 "HTMLParser.y"
+#line 838 "HTMLParser.y"
 {
     yyval.element_list = yyvsp[-1].element_list ? yyvsp[-1].element_list : new list<auto_ptr<Element> >;
     yyval.element_list->push_back(auto_ptr<Element>(yyvsp[0].element));
   ;
     break;}
 case 122:
-#line 840 "HTMLParser.y"
+#line 842 "HTMLParser.y"
 {
     yyval.element_list = yyvsp[-1].element_list ? yyvsp[-1].element_list : new list<auto_ptr<Element> >;
     Param *p = new Param;
@@ -2798,26 +2800,26 @@ case 122:
   ;
     break;}
 case 123:
-#line 849 "HTMLParser.y"
+#line 851 "HTMLParser.y"
 {
     yyval.tag_attributes_list = 0;
   ;
     break;}
 case 124:
-#line 852 "HTMLParser.y"
+#line 854 "HTMLParser.y"
 {
     yyval.tag_attributes_list = yyvsp[-1].tag_attributes_list;
   ;
     break;}
 case 125:
-#line 855 "HTMLParser.y"
+#line 857 "HTMLParser.y"
 {
     yyval.tag_attributes_list = yyvsp[-1].tag_attributes_list ? yyvsp[-1].tag_attributes_list : new list<auto_ptr<list<TagAttribute> > >;
     yyval.tag_attributes_list->push_back(auto_ptr<list<TagAttribute> >(yyvsp[0].tag_attributes));
   ;
     break;}
 case 126:
-#line 862 "HTMLParser.y"
+#line 864 "HTMLParser.y"
 {
     Input *i = new Input;
     i->attributes.reset(yyvsp[0].tag_attributes);
@@ -2825,7 +2827,7 @@ case 126:
   ;
     break;}
 case 127:
-#line 867 "HTMLParser.y"
+#line 869 "HTMLParser.y"
 {
     Select *s = new Select;
     s->attributes.reset(yyvsp[-2].tag_attributes);
@@ -2834,7 +2836,7 @@ case 127:
   ;
     break;}
 case 128:
-#line 873 "HTMLParser.y"
+#line 875 "HTMLParser.y"
 {
     TextArea *ta = new TextArea;
     ta->attributes.reset(yyvsp[-2].tag_attributes);
@@ -2843,20 +2845,20 @@ case 128:
   ;
     break;}
 case 129:
-#line 882 "HTMLParser.y"
+#line 884 "HTMLParser.y"
 {
     yyval.option_list = new list<auto_ptr<Option> >;
     yyval.option_list->push_back(auto_ptr<Option>(yyvsp[0].option));
   ;
     break;}
 case 130:
-#line 886 "HTMLParser.y"
+#line 888 "HTMLParser.y"
 {
     (yyval.option_list = yyvsp[-1].option_list)->push_back(auto_ptr<Option>(yyvsp[0].option));
   ;
     break;}
 case 131:
-#line 892 "HTMLParser.y"
+#line 894 "HTMLParser.y"
 {
     yyval.option = new Option;
     yyval.option->attributes.reset(yyvsp[-2].tag_attributes);
@@ -2864,99 +2866,99 @@ case 131:
   ;
     break;}
 case 132:
-#line 902 "HTMLParser.y"
+#line 904 "HTMLParser.y"
 { yyval.heading = new Heading; yyval.heading->level = 1; yyval.heading->attributes.reset(yyvsp[0].tag_attributes); ;
     break;}
 case 133:
-#line 903 "HTMLParser.y"
+#line 905 "HTMLParser.y"
 { yyval.heading = new Heading; yyval.heading->level = 2; yyval.heading->attributes.reset(yyvsp[0].tag_attributes); ;
     break;}
 case 134:
-#line 904 "HTMLParser.y"
+#line 906 "HTMLParser.y"
 { yyval.heading = new Heading; yyval.heading->level = 3; yyval.heading->attributes.reset(yyvsp[0].tag_attributes); ;
     break;}
 case 135:
-#line 905 "HTMLParser.y"
+#line 907 "HTMLParser.y"
 { yyval.heading = new Heading; yyval.heading->level = 4; yyval.heading->attributes.reset(yyvsp[0].tag_attributes); ;
     break;}
 case 136:
-#line 906 "HTMLParser.y"
+#line 908 "HTMLParser.y"
 { yyval.heading = new Heading; yyval.heading->level = 5; yyval.heading->attributes.reset(yyvsp[0].tag_attributes); ;
     break;}
 case 137:
-#line 907 "HTMLParser.y"
+#line 909 "HTMLParser.y"
 { yyval.heading = new Heading; yyval.heading->level = 6; yyval.heading->attributes.reset(yyvsp[0].tag_attributes); ;
     break;}
 case 138:
-#line 911 "HTMLParser.y"
+#line 913 "HTMLParser.y"
 { yyval.inT = 1; ;
     break;}
 case 139:
-#line 912 "HTMLParser.y"
+#line 914 "HTMLParser.y"
 { yyval.inT = 2; ;
     break;}
 case 140:
-#line 913 "HTMLParser.y"
+#line 915 "HTMLParser.y"
 { yyval.inT = 3; ;
     break;}
 case 141:
-#line 914 "HTMLParser.y"
+#line 916 "HTMLParser.y"
 { yyval.inT = 4; ;
     break;}
 case 142:
-#line 915 "HTMLParser.y"
+#line 917 "HTMLParser.y"
 { yyval.inT = 5; ;
     break;}
 case 143:
-#line 916 "HTMLParser.y"
+#line 918 "HTMLParser.y"
 { yyval.inT = 6; ;
     break;}
 case 144:
-#line 921 "HTMLParser.y"
+#line 923 "HTMLParser.y"
 { yyval.pcdata = 0; ;
     break;}
 case 145:
-#line 921 "HTMLParser.y"
+#line 923 "HTMLParser.y"
 { yyval.pcdata = yyvsp[0].pcdata; ;
     break;}
 case 146:
-#line 922 "HTMLParser.y"
+#line 924 "HTMLParser.y"
 { yyval.caption = 0; ;
     break;}
 case 147:
-#line 922 "HTMLParser.y"
+#line 924 "HTMLParser.y"
 { yyval.caption = yyvsp[0].caption; ;
     break;}
 case 148:
-#line 923 "HTMLParser.y"
+#line 925 "HTMLParser.y"
 { yyval.element_list = 0; ;
     break;}
 case 149:
-#line 923 "HTMLParser.y"
+#line 925 "HTMLParser.y"
 { yyval.element_list = yyvsp[0].element_list; ;
     break;}
 case 150:
-#line 924 "HTMLParser.y"
+#line 926 "HTMLParser.y"
 { yyval.element_list = 0; ;
     break;}
 case 151:
-#line 924 "HTMLParser.y"
+#line 926 "HTMLParser.y"
 { yyval.element_list = yyvsp[0].element_list; ;
     break;}
 case 152:
-#line 926 "HTMLParser.y"
+#line 928 "HTMLParser.y"
 { yyval.tag_attributes = 0; ;
     break;}
 case 153:
-#line 926 "HTMLParser.y"
+#line 928 "HTMLParser.y"
 { yyval.tag_attributes = yyvsp[0].tag_attributes; ;
     break;}
 case 154:
-#line 927 "HTMLParser.y"
+#line 929 "HTMLParser.y"
 { yyval.tag_attributes = 0; ;
     break;}
 case 155:
-#line 927 "HTMLParser.y"
+#line 929 "HTMLParser.y"
 { yyval.tag_attributes = yyvsp[0].tag_attributes; ;
     break;}
 }
@@ -3158,7 +3160,7 @@ yyerrhandle:
 /* END */
 
 /* #line 891 "/usr/local/lib/bison.cc" */
-#line 965 "HTMLParser.y"
+#line 967 "HTMLParser.y"
  /* } */
 
 /*
Index: html2text/HTMLParser.y
===================================================================
--- html2text.orig/HTMLParser.y
+++ html2text/HTMLParser.y
@@ -337,7 +337,9 @@ document_:
     ($$ = $1)->head.base_attributes.reset($2);
   }
   | document_ META {
-    ($$ = $1)->head.meta_attributes.reset($2);
+    auto_ptr<Meta> s(new Meta);
+    s->attributes.reset($2);
+    ($$ = $1)->head.metas.push_back(s);
   }
   | document_ LINK {
     ($$ = $1)->head.link_attributes.reset($2);
Index: html2text/html.C
===================================================================
--- html2text.orig/html.C
+++ html2text/html.C
@@ -68,6 +68,7 @@ static pack(Option)
 static pack(DefinitionListItem)
 static pack(Script)
 static pack(Style)
+static pack(Meta)
 
 #undef pack
 
@@ -131,12 +132,18 @@ Head::unparse(ostream &os, ostream_manip
   if (base_attributes.get()) os << "<BASE" << base_attributes << ">" << std::endl;
   foreach(scripts, os, separator);
   foreach(styles, os, separator);
-  if (meta_attributes.get()) os << "<META" << meta_attributes << ">" << std::endl;
+  foreach(metas, os, separator);
   if (link_attributes.get()) os << "<LINK" << link_attributes << ">" << std::endl;
   os << "</HEAD>" << separator;
 }
 
 void
+Meta::unparse(ostream &os, ostream_manipulator separator) const
+{
+  os << "<META" << attributes << ">" << separator;
+}
+
+void
 Script::unparse(ostream &os, ostream_manipulator separator) const
 {
   os
Index: html2text/html.h
===================================================================
--- html2text.orig/html.h
+++ html2text/html.h
@@ -436,13 +436,19 @@ struct Style {
   void unparse(ostream &, ostream_manipulator separator) const;
 };
 
+struct Meta {
+  auto_ptr<list<TagAttribute> > attributes;    // HTTP-EQUIV NAME CONTENT
+
+  void unparse(ostream &, ostream_manipulator separator) const;
+};
+
 struct Head {
   auto_ptr<PCData>              title;
   auto_ptr<list<TagAttribute> > isindex_attributes; // PROMPT
   auto_ptr<list<TagAttribute> > base_attributes;    // HREF
   list<auto_ptr<Script> >       scripts;
   list<auto_ptr<Style> >        styles;
-  auto_ptr<list<TagAttribute> > meta_attributes;    // HTTP-EQUIV NAME CONTENT
+  list<auto_ptr<Meta> >         metas;
   auto_ptr<list<TagAttribute> > link_attributes;    // HREF REL REV TITLE
 
   void unparse(ostream &, ostream_manipulator separator) const;
