X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fhtml.c;h=0be011d12876acbac0f55c255aece5c8cb8d9227;hb=1c02620baa5dd413e3284071f6a5184c1e77bf40;hp=3f07adcfeebd1dd634d19ba55c296054a21f0e5b;hpb=abc77034fd0bf89464c491ca3b573f6c3ab17648;p=pspp diff --git a/src/output/html.c b/src/output/html.c index 3f07adcfee..0be011d128 100644 --- a/src/output/html.c +++ b/src/output/html.c @@ -292,7 +292,7 @@ html_submit (struct output_driver *driver, else if (is_text_item (output_item)) { struct text_item *text_item = to_text_item (output_item); - const char *s = text_item_get_text (text_item); + char *s = text_item_get_plain_text (text_item); switch (text_item_get_type (text_item)) { @@ -319,6 +319,8 @@ html_submit (struct output_driver *driver, fprintf (html->file, "

\n"); break; } + + free (s); } else if (is_message_item (output_item)) { @@ -586,17 +588,20 @@ html_put_table_cell (struct html_driver *html, const struct pivot_table *pt, if (cell->value->n_footnotes > 0) { fputs ("", html->file); + size_t n_footnotes = 0; for (size_t i = 0; i < cell->value->n_footnotes; i++) { - if (i > 0) - putc (',', html->file); - - size_t idx = cell->value->footnote_indexes[i]; - const struct pivot_footnote *f = pt->footnotes[idx]; + const struct pivot_footnote *f + = pt->footnotes[cell->value->footnote_indexes[i]]; + if (f->show) + { + if (n_footnotes++ > 0) + putc (',', html->file); - char *marker = pivot_footnote_marker_string (f, pt); - escape_string (html->file, marker, " ", "
"); - free (marker); + char *marker = pivot_footnote_marker_string (f, pt); + escape_string (html->file, marker, " ", "
"); + free (marker); + } } fputs ("
", html->file); }