# HG changeset patch # User tomkiewicz@cpw.pidgin.im # Date 1337540917 0 # Node ID f124ad0022cea3ec58d4c1bc2d64d9190dde4883 # Parent 1c0d9e817dcc1d3ba55ee1bc0f641c68beda598e Still making trunk usable again: correctly display plaintext logs diff -r 1c0d9e817dcc -r f124ad0022ce pidgin/gtklog.c --- a/pidgin/gtklog.c Sat May 19 16:38:38 2012 +0000 +++ b/pidgin/gtklog.c Sun May 20 19:08:37 2012 +0000 @@ -465,6 +465,14 @@ webkit_web_view_open(WEBKIT_WEB_VIEW(viewer->web_view), "about:blank"); purple_signal_emit(pidgin_log_get_handle(), "log-displaying", viewer, log); + + /* plaintext log (html one starts with tag) */ + if (read[0] != '<') + { + char *newRead = purple_strreplace(read, "\n", "
"); + g_free(read); + read = newRead; + } webkit_web_view_load_html_string(WEBKIT_WEB_VIEW(viewer->web_view), read, ""); g_free(read);