html: Step toward better handling of text_items.
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 29 Dec 2020 01:47:31 +0000 (17:47 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Thu, 31 Dec 2020 03:58:11 +0000 (19:58 -0800)
There's more work to do to get the fonts, especially, correct.

src/output/html.c

index 64db78dc8ec0c88fb931e913e282c9caea1be060..9a803d1ab0814f8ae3507aa2f74d8edb88002dbb 100644 (file)
@@ -308,7 +308,9 @@ html_submit (struct output_driver *driver,
           break;
 
         case TEXT_ITEM_LOG:
-          print_title_tag (html->file, "pre", s); /* should be <P><TT> */
+          fprintf (html->file, "<p>");
+          escape_string (html->file, s, " ", "<br>");
+          fprintf (html->file, "</p>\n");
           break;
         }
     }
@@ -316,7 +318,9 @@ html_submit (struct output_driver *driver,
     {
       const struct message_item *message_item = to_message_item (output_item);
       char *s = msg_to_string (message_item_get_msg (message_item));
-      print_title_tag (html->file, "p", s);
+      fprintf (html->file, "<p>");
+      escape_string (html->file, s, " ", "<br>");
+      fprintf (html->file, "</p>\n");
       free (s);
     }
 }