X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fhtml.c;h=3e85b3d968b69c76653775a7239f10c9e08869e3;hb=d1d0556e538bf04cb0b991b7acb205c144a2f826;hp=8d20a61b3796c8837412018c436f80be77958d9e;hpb=3d48d485cb9eca0283aa5f910c86e86a73242490;p=pspp diff --git a/src/output/html.c b/src/output/html.c index 8d20a61b37..3e85b3d968 100644 --- a/src/output/html.c +++ b/src/output/html.c @@ -68,7 +68,7 @@ static void html_output_table (struct html_driver *, const struct table *, const char *caption); static void escape_string (FILE *file, const char *text, size_t length, - const char *space); + const char *space, const char *newline); static void print_title_tag (FILE *file, const char *name, const char *content); @@ -201,7 +201,7 @@ print_title_tag (FILE *file, const char *name, const char *content) if (content != NULL) { fprintf (file, "<%s>", name); - escape_string (file, content, strlen (content), " "); + escape_string (file, content, strlen (content), " ", " - "); fprintf (file, "%s>\n", name); } } @@ -276,7 +276,7 @@ html_submit (struct output_driver *driver, case TEXT_ITEM_COMMAND_OPEN: fprintf (html->file, "
"); - escape_string (html->file, s, strlen (s), " "); + escape_string (html->file, s, strlen (s), " ", "\n"); break; @@ -327,19 +327,23 @@ html_submit (struct output_driver *driver, } } -/* Write LENGTH characters in TEXT to file F, escaping characters - as necessary for HTML. Spaces are replaced by SPACE, which - should be " " or " ". */ +/* Write LENGTH characters in TEXT to file F, escaping characters as necessary + for HTML. Spaces are replaced by SPACE, which should be " " or " " + New-lines are replaced by NEWLINE, which might be "
"); fprintf (html->file, "