From e7eae4ec8f5aa3069b9620f29d5f29d748264457 Mon Sep 17 00:00:00 2001 From: Nikolas Garofil Date: Sat, 5 Jun 2010 02:08:50 +0200 Subject: [PATCH] Change newlines in "
"-s when out_to_http is used --- src/conky.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/conky.cc b/src/conky.cc index 5fb37b8b..48c0be16 100644 --- a/src/conky.cc +++ b/src/conky.cc @@ -1213,7 +1213,13 @@ static void draw_string(const char *s) #endif #ifdef BUILD_HTTP if ((output_methods & TO_HTTP) && draw_mode == FG) { + std::string::size_type i = webpage.length(); webpage.append(s_with_newlines); + while(1) { + i = webpage.find('\n', i); + if(i == std::string::npos) break; + webpage.replace(i, 1, "
"); + } webpage.append("
"); } #endif