about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/api.c6
-rw-r--r--src/ui/chatwin.c8
-rw-r--r--src/ui/console.c26
-rw-r--r--src/ui/core.c14
-rw-r--r--src/ui/mucconfwin.c14
-rw-r--r--src/ui/mucwin.c22
-rw-r--r--src/ui/privwin.c2
-rw-r--r--src/ui/window.c30
-rw-r--r--src/ui/xmlwin.c4
9 files changed, 63 insertions, 63 deletions
diff --git a/src/plugins/api.c b/src/plugins/api.c
index 3de5efab..670f8551 100644
--- a/src/plugins/api.c
+++ b/src/plugins/api.c
@@ -85,7 +85,7 @@ api_cons_show_themed(const char *const group, const char *const key, const char
     char *parsed = str_replace(message, "\r\n", "\n");
     theme_item_t themeitem = plugin_themes_get(group, key, def);
     ProfWin *console = wins_get_console();
-    win_printf(console, '-', 0, NULL, 0, themeitem, "", parsed);
+    win_printf(console, '-', 0, NULL, 0, themeitem, "", "%s", parsed);
 
     free(parsed);
 
@@ -368,7 +368,7 @@ api_win_show(const char *tag, const char *line)
     }
 
     ProfWin *window = (ProfWin*)pluginwin;
-    win_printf(window, '!', 0, NULL, 0, 0, "", line);
+    win_printf(window, '!', 0, NULL, 0, 0, "", "%s", line);
 
     return 1;
 }
@@ -393,7 +393,7 @@ api_win_show_themed(const char *tag, const char *const group, const char *const
 
     theme_item_t themeitem = plugin_themes_get(group, key, def);
     ProfWin *window = (ProfWin*)pluginwin;
-    win_printf(window, '!', 0, NULL, 0, themeitem, "", line);
+    win_printf(window, '!', 0, NULL, 0, themeitem, "", "%s", line);
 
     return 1;
 }
diff --git a/src/ui/chatwin.c b/src/ui/chatwin.c
index 0d7f01b0..8fc06307 100644
--- a/src/ui/chatwin.c
+++ b/src/ui/chatwin.c
@@ -308,7 +308,7 @@ chatwin_outgoing_msg(ProfChatWin *chatwin, const char *const message, char *id,
     if (request_receipt && id) {
         win_print_with_receipt((ProfWin*)chatwin, enc_char, "me", message, id);
     } else {
-        win_printf((ProfWin*)chatwin, enc_char, 0, NULL, 0, THEME_TEXT_ME, "me", message);
+        win_printf((ProfWin*)chatwin, enc_char, 0, NULL, 0, THEME_TEXT_ME, "me", "%s", message);
     }
 }
 
@@ -322,7 +322,7 @@ chatwin_outgoing_carbon(ProfChatWin *chatwin, const char *const message, prof_en
         enc_char = prefs_get_pgp_char();
     }
 
-    win_printf((ProfWin*)chatwin, enc_char, 0, NULL, 0, THEME_TEXT_ME, "me", message);
+    win_printf((ProfWin*)chatwin, enc_char, 0, NULL, 0, THEME_TEXT_ME, "me", "%s", message);
     int num = wins_get_num((ProfWin*)chatwin);
     status_bar_active(num);
 }
@@ -401,11 +401,11 @@ _chatwin_history(ProfChatWin *chatwin, const char *const contact)
                 char mm[3]; memcpy(mm, &line[3], 2); mm[2] = '\0'; int imm = atoi(mm);
                 char ss[3]; memcpy(ss, &line[6], 2); ss[2] = '\0'; int iss = atoi(ss);
                 GDateTime *timestamp = g_date_time_new_local(2000, 1, 1, ihh, imm, iss);
-                win_printf((ProfWin*)chatwin, '-', 0, timestamp, NO_COLOUR_DATE, 0, "", curr->data+11);
+                win_printf((ProfWin*)chatwin, '-', 0, timestamp, NO_COLOUR_DATE, 0, "", "%s", curr->data+11);
                 g_date_time_unref(timestamp);
             // header
             } else {
-                win_printf((ProfWin*)chatwin, '-', 0, NULL, 0, 0, "", curr->data);
+                win_printf((ProfWin*)chatwin, '-', 0, NULL, 0, 0, "", "%s", curr->data);
             }
             curr = g_slist_next(curr);
         }
diff --git a/src/ui/console.c b/src/ui/console.c
index 46c06b71..03e9f439 100644
--- a/src/ui/console.c
+++ b/src/ui/console.c
@@ -74,7 +74,7 @@ void
 cons_show_word(const char *const word)
 {
     ProfWin *console = wins_get_console();
-    win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", word);
+    win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", word);
 }
 
 void
@@ -181,7 +181,7 @@ cons_show_error(const char *const msg, ...)
     va_start(arg, msg);
     GString *fmt_msg = g_string_new(NULL);
     g_string_vprintf(fmt_msg, msg, arg);
-    win_printf(console, '-', 0, NULL, 0, THEME_ERROR, "", fmt_msg->str);
+    win_printf(console, '-', 0, NULL, 0, THEME_ERROR, "", "%s", fmt_msg->str);
     g_string_free(fmt_msg, TRUE);
     va_end(arg);
 
@@ -562,19 +562,19 @@ cons_show_caps(const char *const fulljid, resource_presence_t presence)
             DiscoIdentity *identity = caps->identity;
             win_printf(console, '-', 0, NULL, NO_EOL, 0, "", "Identity: ");
             if (identity->name) {
-                win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", identity->name);
+                win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->name);
                 if (identity->category || identity->type) {
                     win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", " ");
                 }
             }
             if (identity->type) {
-                win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", identity->type);
+                win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->type);
                 if (identity->category) {
                     win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", " ");
                 }
             }
             if (identity->category) {
-                win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", identity->category);
+                win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->category);
             }
             win_newline(console);
         }
@@ -1016,19 +1016,19 @@ cons_show_account(ProfAccount *account)
                     DiscoIdentity *identity = caps->identity;
                     win_printf(console, '-', 0, NULL, NO_EOL, 0, "", "    Identity: ");
                     if (identity->name) {
-                        win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", identity->name);
+                        win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->name);
                         if (identity->category || identity->type) {
                             win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", " ");
                         }
                     }
                     if (identity->type) {
-                        win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", identity->type);
+                        win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->type);
                         if (identity->category) {
                             win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", " ");
                         }
                     }
                     if (identity->category) {
-                        win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", identity->category);
+                        win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->category);
                     }
                     win_newline(console);
                 }
@@ -2184,14 +2184,14 @@ _cons_theme_bar_prop(theme_item_t theme, char *prop)
 
     GString *propstr = g_string_new(" ");
     g_string_append_printf(propstr, "%-24s", prop);
-    win_printf(console, '-', 0, NULL, NO_EOL, THEME_TEXT, "", propstr->str);
+    win_printf(console, '-', 0, NULL, NO_EOL, THEME_TEXT, "", "%s", propstr->str);
     g_string_free(propstr, TRUE);
 
     GString *valstr = g_string_new(" ");
     char *setting = theme_get_string(prop);
     g_string_append_printf(valstr, "%s ", setting);
     theme_free_string(setting);
-    win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, theme, "", valstr->str);
+    win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, theme, "", "%s", valstr->str);
     win_printf(console, '-', 0, NULL, NO_DATE, THEME_TEXT, "", "");
     g_string_free(valstr, TRUE);
 }
@@ -2203,14 +2203,14 @@ _cons_theme_prop(theme_item_t theme, char *prop)
 
     GString *propstr = g_string_new(" ");
     g_string_append_printf(propstr, "%-24s", prop);
-    win_printf(console, '-', 0, NULL, NO_EOL, THEME_TEXT, "", propstr->str);
+    win_printf(console, '-', 0, NULL, NO_EOL, THEME_TEXT, "", "%s", propstr->str);
     g_string_free(propstr, TRUE);
 
     GString *valstr = g_string_new("");
     char *setting = theme_get_string(prop);
     g_string_append_printf(valstr, "%s", setting);
     theme_free_string(setting);
-    win_printf(console, '-', 0, NULL, NO_DATE, theme, "", valstr->str);
+    win_printf(console, '-', 0, NULL, NO_DATE, theme, "", "%s", valstr->str);
     g_string_free(valstr, TRUE);
 }
 
@@ -2393,7 +2393,7 @@ _show_roster_contacts(GSList *list, gboolean show_groups)
         } else {
             presence_colour = theme_main_presence_attrs("offline");
         }
-        win_printf(console, '-', 0, NULL, NO_EOL, presence_colour, "", title->str);
+        win_printf(console, '-', 0, NULL, NO_EOL, presence_colour, "", "%s", title->str);
 
         g_string_free(title, TRUE);
 
diff --git a/src/ui/core.c b/src/ui/core.c
index daa54ef3..c1bba8ac 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -435,7 +435,7 @@ ui_handle_otr_error(const char *const barejid, const char *const message)
 {
     ProfChatWin *chatwin = wins_get_chat(barejid);
     if (chatwin) {
-        win_printf((ProfWin*)chatwin, '!', 0, NULL, 0, THEME_ERROR, "", message);
+        win_printf((ProfWin*)chatwin, '!', 0, NULL, 0, THEME_ERROR, "", "%s", message);
     } else {
         cons_show_error("%s - %s", barejid, message);
     }
@@ -752,7 +752,7 @@ ui_current_print_formatted_line(const char show_char, int attrs, const char *con
     va_start(arg, msg);
     GString *fmt_msg = g_string_new(NULL);
     g_string_vprintf(fmt_msg, msg, arg);
-    win_printf(current, show_char, 0, NULL, 0, attrs, "", fmt_msg->str);
+    win_printf(current, show_char, 0, NULL, 0, attrs, "", "%s", fmt_msg->str);
     va_end(arg);
     g_string_free(fmt_msg, TRUE);
 }
@@ -760,14 +760,14 @@ ui_current_print_formatted_line(const char show_char, int attrs, const char *con
 void
 ui_win_error_line(ProfWin *window, const char *const msg)
 {
-    win_printf(window, '-', 0, NULL, 0, THEME_ERROR, "", msg);
+    win_printf(window, '-', 0, NULL, 0, THEME_ERROR, "", "%s", msg);
 }
 
 void
 ui_current_error_line(const char *const msg)
 {
     ProfWin *current = wins_get_current();
-    win_printf(current, '-', 0, NULL, 0, THEME_ERROR, "", msg);
+    win_printf(current, '-', 0, NULL, 0, THEME_ERROR, "", "%s", msg);
 }
 
 void
@@ -1158,7 +1158,7 @@ ui_handle_room_configuration_form_error(const char *const roomjid, const char *c
         g_string_append(message_str, message);
     }
 
-    win_printf(window, '-', 0, NULL, 0, THEME_ERROR, "", message_str->str);
+    win_printf(window, '-', 0, NULL, 0, THEME_ERROR, "", "%s", message_str->str);
 
     g_string_free(message_str, TRUE);
 }
@@ -1237,7 +1237,7 @@ ui_show_lines(ProfWin *window, gchar** lines)
     if (lines) {
         int i;
         for (i = 0; lines[i] != NULL; i++) {
-            win_printf(window, '-', 0, NULL, 0, 0, "", lines[i]);
+            win_printf(window, '-', 0, NULL, 0, 0, "", "%s", lines[i]);
         }
     }
 }
@@ -1274,7 +1274,7 @@ ui_handle_software_version_error(const char *const roomjid, const char *const me
         g_string_append(message_str, message);
     }
 
-    win_printf(window, '-', 0, NULL, 0, THEME_ERROR, "", message_str->str);
+    win_printf(window, '-', 0, NULL, 0, THEME_ERROR, "", "%s", message_str->str);
 
     g_string_free(message_str, TRUE);
 }
diff --git a/src/ui/mucconfwin.c b/src/ui/mucconfwin.c
index c834bb93..954e4e0e 100644
--- a/src/ui/mucconfwin.c
+++ b/src/ui/mucconfwin.c
@@ -48,7 +48,7 @@ mucconfwin_show_form(ProfMucConfWin *confwin)
     ProfWin *window = (ProfWin*) confwin;
     if (confwin->form->title) {
         win_printf(window, '-', 0, NULL, NO_EOL, 0, "", "Form title: ");
-        win_printf(window, '-', 0, NULL, NO_DATE, 0, "", confwin->form->title);
+        win_printf(window, '-', 0, NULL, NO_DATE, 0, "", "%s", confwin->form->title);
     } else {
         win_printf(window, '-', 0, NULL, 0, 0, "", "Configuration for room %s.", confwin->roomjid);
     }
@@ -64,7 +64,7 @@ mucconfwin_show_form(ProfMucConfWin *confwin)
         if ((g_strcmp0(field->type, "fixed") == 0) && field->values) {
             if (field->values) {
                 char *value = field->values->data;
-                win_printf(window, '-', 0, NULL, 0, 0, "", value);
+                win_printf(window, '-', 0, NULL, 0, 0, "", "%s", value);
             }
         } else if (g_strcmp0(field->type, "hidden") != 0 && field->var) {
             char *tag = g_hash_table_lookup(confwin->form->var_to_tag, field->var);
@@ -111,7 +111,7 @@ mucconfwin_field_help(ProfMucConfWin *confwin, char *tag)
     ProfWin *window = (ProfWin*) confwin;
     FormField *field = form_get_field_by_tag(confwin->form, tag);
     if (field) {
-        win_printf(window, '-', 0, NULL, NO_EOL, 0, "", field->label);
+        win_printf(window, '-', 0, NULL, NO_EOL, 0, "", "%s", field->label);
         if (field->required) {
             win_printf(window, '-', 0, NULL, NO_DATE, 0, "", " (Required):");
         } else {
@@ -194,7 +194,7 @@ mucconfwin_form_help(ProfMucConfWin *confwin)
     if (confwin->form->instructions) {
         ProfWin *window = (ProfWin*) confwin;
         win_printf(window, '-', 0, NULL, 0, 0, "", "Supplied instructions:");
-        win_printf(window, '-', 0, NULL, 0, 0, "", confwin->form->instructions);
+        win_printf(window, '-', 0, NULL, 0, 0, "", "%s", confwin->form->instructions);
         win_printf(window, '-', 0, NULL, 0, 0, "", "");
     }
 }
@@ -223,7 +223,7 @@ _mucconfwin_form_field(ProfWin *window, char *tag, FormField *field)
                 if (g_strcmp0(field->var, "muc#roomconfig_roomsecret") == 0) {
                     win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, THEME_ONLINE, "", "[hidden]");
                 } else {
-                    win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, THEME_ONLINE, "", value);
+                    win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, THEME_ONLINE, "", "%s", value);
                 }
             }
         }
@@ -303,7 +303,7 @@ _mucconfwin_form_field(ProfWin *window, char *tag, FormField *field)
         if (curr_value) {
             char *value = curr_value->data;
             if (value) {
-                win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, THEME_ONLINE, "", value);
+                win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, THEME_ONLINE, "", "%s", value);
             }
         }
         win_newline(window);
@@ -320,7 +320,7 @@ _mucconfwin_form_field(ProfWin *window, char *tag, FormField *field)
         if (curr_value) {
             char *value = curr_value->data;
             if (value) {
-                win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", value);
+                win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", value);
             }
         }
         win_newline(window);
diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c
index 7bbf65e8..9b0341c2 100644
--- a/src/ui/mucwin.c
+++ b/src/ui/mucwin.c
@@ -182,7 +182,7 @@ mucwin_room_disco_info(ProfMucWin *mucwin, GSList *identities, GSList *features)
             if (identity->category) {
                 identity_str = g_string_append(identity_str, identity->category);
             }
-            win_printf(window, '!', 0, NULL, 0, 0, "", identity_str->str);
+            win_printf(window, '!', 0, NULL, 0, 0, "", "%s", identity_str->str);
             g_string_free(identity_str, TRUE);
             identities = g_slist_next(identities);
         }
@@ -355,7 +355,7 @@ mucwin_history(ProfMucWin *mucwin, const char *const nick, GDateTime *timestamp,
         g_string_append(line, message);
     }
 
-    win_printf(window, '-', 0, timestamp, NO_COLOUR_DATE, 0, "", line->str);
+    win_printf(window, '-', 0, timestamp, NO_COLOUR_DATE, 0, "", "%s", line->str);
     g_string_free(line, TRUE);
 
     plugins_on_room_history_message(mucwin->roomjid, nick, message, timestamp);
@@ -371,10 +371,10 @@ _mucwin_print_mention(ProfWin *window, const char *const message, const char *co
         pos = GPOINTER_TO_INT(curr->data);
 
         char *before_str = g_strndup(message + last_pos, pos - last_pos);
-        win_printf(window, '-', 0, NULL, NO_DATE | NO_ME | NO_EOL, THEME_ROOMMENTION, "", before_str);
+        win_printf(window, '-', 0, NULL, NO_DATE | NO_ME | NO_EOL, THEME_ROOMMENTION, "", "%s", before_str);
         g_free(before_str);
         char *nick_str = g_strndup(message + pos, strlen(nick));
-        win_printf(window, '-', 0, NULL, NO_DATE | NO_ME | NO_EOL, THEME_ROOMMENTION_TERM, "", nick_str);
+        win_printf(window, '-', 0, NULL, NO_DATE | NO_ME | NO_EOL, THEME_ROOMMENTION_TERM, "", "%s", nick_str);
         g_free(nick_str);
 
         last_pos = pos + strlen(nick);
@@ -382,7 +382,7 @@ _mucwin_print_mention(ProfWin *window, const char *const message, const char *co
         curr = g_slist_next(curr);
     }
     if (last_pos < strlen(message)) {
-        win_printf(window, '-', 0, NULL, NO_DATE | NO_ME, THEME_ROOMMENTION, "", &message[last_pos]);
+        win_printf(window, '-', 0, NULL, NO_DATE | NO_ME, THEME_ROOMMENTION, "", "%s", &message[last_pos]);
     } else {
         win_printf(window, '-', 0, NULL, NO_DATE | NO_ME, THEME_ROOMMENTION, "", "");
     }
@@ -442,7 +442,7 @@ _mucwin_print_triggers(ProfWin *window, const char *const message, GList *trigge
 
     // no triggers found
     if (first_trigger_pos == -1) {
-        win_printf(window, '-', 0, NULL, NO_DATE | NO_ME, THEME_ROOMTRIGGER, "", message);
+        win_printf(window, '-', 0, NULL, NO_DATE | NO_ME, THEME_ROOMTRIGGER, "", "%s", message);
     } else {
         if (first_trigger_pos > 0) {
             char message_section[strlen(message) + 1];
@@ -452,7 +452,7 @@ _mucwin_print_triggers(ProfWin *window, const char *const message, GList *trigge
                 i++;
             }
             message_section[i] = '\0';
-            win_printf(window, '-', 0, NULL, NO_DATE | NO_ME | NO_EOL, THEME_ROOMTRIGGER, "", message_section);
+            win_printf(window, '-', 0, NULL, NO_DATE | NO_ME | NO_EOL, THEME_ROOMTRIGGER, "", "%s", message_section);
         }
         char trigger_section[first_trigger_len + 1];
         int i = 0;
@@ -463,10 +463,10 @@ _mucwin_print_triggers(ProfWin *window, const char *const message, GList *trigge
         trigger_section[i] = '\0';
 
         if (first_trigger_pos + first_trigger_len < strlen(message)) {
-            win_printf(window, '-', 0, NULL, NO_DATE | NO_ME | NO_EOL, THEME_ROOMTRIGGER_TERM, "", trigger_section);
+            win_printf(window, '-', 0, NULL, NO_DATE | NO_ME | NO_EOL, THEME_ROOMTRIGGER_TERM, "", "%s", trigger_section);
             _mucwin_print_triggers(window, &message[first_trigger_pos + first_trigger_len], triggers);
         } else {
-            win_printf(window, '-', 0, NULL, NO_DATE | NO_ME, THEME_ROOMTRIGGER_TERM, "", trigger_section);
+            win_printf(window, '-', 0, NULL, NO_DATE | NO_ME, THEME_ROOMTRIGGER_TERM, "", "%s", trigger_section);
         }
     }
 }
@@ -487,10 +487,10 @@ mucwin_message(ProfMucWin *mucwin, const char *const nick, const char *const mes
             win_printf(window, '-', 0, NULL, NO_ME | NO_EOL, THEME_ROOMTRIGGER, nick, "");
             _mucwin_print_triggers(window, message, triggers);
         } else {
-            win_printf(window, '-', 0, NULL, NO_ME, THEME_TEXT_THEM, nick, message);
+            win_printf(window, '-', 0, NULL, NO_ME, THEME_TEXT_THEM, nick, "%s", message);
         }
     } else {
-        win_printf(window, '-', 0, NULL, 0, THEME_TEXT_ME, nick, message);
+        win_printf(window, '-', 0, NULL, 0, THEME_TEXT_ME, nick, "%s", message);
     }
 }
 
diff --git a/src/ui/privwin.c b/src/ui/privwin.c
index fe98aa85..17a24138 100644
--- a/src/ui/privwin.c
+++ b/src/ui/privwin.c
@@ -93,7 +93,7 @@ privwin_outgoing_msg(ProfPrivateWin *privwin, const char *const message)
 {
     assert(privwin != NULL);
 
-    win_printf((ProfWin*)privwin, '-', 0, NULL, 0, THEME_TEXT_ME, "me", message);
+    win_printf((ProfWin*)privwin, '-', 0, NULL, 0, THEME_TEXT_ME, "me", "%s", message);
 }
 
 void
diff --git a/src/ui/window.c b/src/ui/window.c
index 133a3990..7a0cc1b8 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -683,7 +683,7 @@ win_show_occupant(ProfWin *window, Occupant *occupant)
 
     theme_item_t presence_colour = theme_main_presence_attrs(presence_str);
 
-    win_printf(window, '-', 0, NULL, NO_EOL, presence_colour, "", occupant->nick);
+    win_printf(window, '-', 0, NULL, NO_EOL, presence_colour, "", "%s", occupant->nick);
     win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", " is %s", presence_str);
 
     if (occupant->status) {
@@ -705,9 +705,9 @@ win_show_contact(ProfWin *window, PContact contact)
     theme_item_t presence_colour = theme_main_presence_attrs(presence);
 
     if (name) {
-        win_printf(window, '-', 0, NULL, NO_EOL, presence_colour, "", name);
+        win_printf(window, '-', 0, NULL, NO_EOL, presence_colour, "", "%s", name);
     } else {
-        win_printf(window, '-', 0, NULL, NO_EOL, presence_colour, "", barejid);
+        win_printf(window, '-', 0, NULL, NO_EOL, presence_colour, "", "%s", barejid);
     }
 
     win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", " is %s", presence);
@@ -747,7 +747,7 @@ win_show_occupant_info(ProfWin *window, const char *const room, Occupant *occupa
 
     theme_item_t presence_colour = theme_main_presence_attrs(presence_str);
 
-    win_printf(window, '!', 0, NULL, NO_EOL, presence_colour, "", occupant->nick);
+    win_printf(window, '!', 0, NULL, NO_EOL, presence_colour, "", "%s", occupant->nick);
     win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", " is %s", presence_str);
 
     if (occupant->status) {
@@ -773,19 +773,19 @@ win_show_occupant_info(ProfWin *window, const char *const room, Occupant *occupa
             DiscoIdentity *identity = caps->identity;
             win_printf(window, '!', 0, NULL, NO_EOL, 0, "", "  Identity: ");
             if (identity->name) {
-                win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, 0, "", identity->name);
+                win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->name);
                 if (identity->category || identity->type) {
                     win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", " ");
                 }
             }
             if (identity->type) {
-                win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, 0, "", identity->type);
+                win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->type);
                 if (identity->category) {
                     win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, 0, "", " ");
                 }
             }
             if (identity->category) {
-                win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, 0, "", identity->category);
+                win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->category);
             }
             win_newline(window);
         }
@@ -830,7 +830,7 @@ win_show_info(ProfWin *window, PContact contact)
     theme_item_t presence_colour = theme_main_presence_attrs(presence);
 
     win_printf(window, '-', 0, NULL, 0, 0, "", "");
-    win_printf(window, '-', 0, NULL, NO_EOL, presence_colour, "", barejid);
+    win_printf(window, '-', 0, NULL, NO_EOL, presence_colour, "", "%s", barejid);
     if (name) {
         win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", " (%s)", name);
     }
@@ -897,19 +897,19 @@ win_show_info(ProfWin *window, PContact contact)
                 DiscoIdentity *identity = caps->identity;
                 win_printf(window, '-', 0, NULL, NO_EOL, 0, "", "    Identity: ");
                 if (identity->name) {
-                    win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", identity->name);
+                    win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->name);
                     if (identity->category || identity->type) {
                         win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", " ");
                     }
                 }
                 if (identity->type) {
-                    win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", identity->type);
+                    win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->type);
                     if (identity->category) {
                         win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", " ");
                     }
                 }
                 if (identity->category) {
-                    win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", identity->category);
+                    win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->category);
                 }
                 win_newline(window);
             }
@@ -1001,10 +1001,10 @@ win_print_incoming_message(ProfWin *window, GDateTime *timestamp,
             } else if (enc_mode == PROF_MSG_PGP) {
                 enc_char = prefs_get_pgp_char();
             }
-            win_printf(window, enc_char, 0, timestamp, NO_ME, THEME_TEXT_THEM, from, message);
+            win_printf(window, enc_char, 0, timestamp, NO_ME, THEME_TEXT_THEM, from, "%s", message);
             break;
         case WIN_PRIVATE:
-            win_printf(window, '-', 0, timestamp, NO_ME, THEME_TEXT_THEM, from, message);
+            win_printf(window, '-', 0, timestamp, NO_ME, THEME_TEXT_THEM, from, "%s", message);
             break;
         default:
             assert(FALSE);
@@ -1113,7 +1113,7 @@ win_update_entry_theme(ProfWin *window, const char *const id, theme_item_t theme
 void
 win_println(ProfWin *window, int pad, const char *const message)
 {
-    win_printf(window, '-', pad, NULL, 0, 0, "", message);
+    win_printf(window, '-', pad, NULL, 0, 0, "", "%s", message);
 }
 
 void
@@ -1123,7 +1123,7 @@ win_vprintln_ch(ProfWin *window, char ch, const char *const message, ...)
     va_start(arg, message);
     GString *fmt_msg = g_string_new(NULL);
     g_string_vprintf(fmt_msg, message, arg);
-    win_printf(window, ch, 0, NULL, 0, 0, "", fmt_msg->str);
+    win_printf(window, ch, 0, NULL, 0, 0, "", "%s", fmt_msg->str);
     g_string_free(fmt_msg, TRUE);
     va_end(arg);
 }
diff --git a/src/ui/xmlwin.c b/src/ui/xmlwin.c
index c8af2211..0172e9ad 100644
--- a/src/ui/xmlwin.c
+++ b/src/ui/xmlwin.c
@@ -46,11 +46,11 @@ xmlwin_show(ProfXMLWin *xmlwin, const char *const msg)
     ProfWin *window = (ProfWin*)xmlwin;
     if (g_str_has_prefix(msg, "SENT:")) {
         win_printf(window, '-', 0, NULL, 0, 0, "", "SENT:");
-        win_printf(window, '-', 0, NULL, 0, THEME_ONLINE, "", &msg[6]);
+        win_printf(window, '-', 0, NULL, 0, THEME_ONLINE, "", "%s", &msg[6]);
         win_printf(window, '-', 0, NULL, 0, THEME_ONLINE, "", "");
     } else if (g_str_has_prefix(msg, "RECV:")) {
         win_printf(window, '-', 0, NULL, 0, 0, "", "RECV:");
-        win_printf(window, '-', 0, NULL, 0, THEME_AWAY, "", &msg[6]);
+        win_printf(window, '-', 0, NULL, 0, THEME_AWAY, "", "%s", &msg[6]);
         win_printf(window, '-', 0, NULL, 0, THEME_AWAY, "", "");
     }
 }