This patch makes the libpurple HTML log writer create HTML log files
which are valid HTML. The simplest log created before the patch caused
the W3C Validator to return 1 error and 3 warnings, while the patched
version validates without errors or warnings.
All credit goes to the original patch author, stars (ticket 17280).
html_logger_read() returns the contents of the HTML log without the first line.
In the “old” format (pre-this-commit), the first line is the one that contains the <h3> tag, and that’s why it does not end up in the log window.
Even though gtkimhtml.c declares VALID_TAG(“H3”), its processing does not do anything, and does not skip the text inside <h3> : this can be confirmed by moving the <h3> tag to the second line in “old” log files.
Declaring VALID_TAG(“H1”) and adding the appropriate case statement (i.e. so that <h1> is handled the same as <h3>) does not do anything, in line with the point above.
All in all, it seems like adding code to gtkimhtml.c so that it handles <h1> as “skip all the text until the tag ends” should be enough : I haven’t tried that yet, though, but there are a few handlers that do exactly this kind of thing.
Edit : or we could just leave the newlines alone and call it a day… sounds like the best idea to be honest. If anybody wants to actually look at these HTML files in an editor, there’s nothing stopping them from using html-tidy first.
To be honest, it doesn’t seem “ignorable” to me : the output is just broken, since the first line (“Conversation with …”) simply doesn’t belong in the right pane and should appear in the window’s header only.
I still think leaving the newlines alone is the best thing to do.