1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-30 05:59:07 +00:00

Change newlines in "<br />"-s when out_to_http is used

This commit is contained in:
Nikolas Garofil 2010-06-05 02:08:50 +02:00
parent 6ab9167e38
commit e7eae4ec8f

View File

@ -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, "<br />");
}
webpage.append("<br />");
}
#endif