Fix empty dialog messages

Escape ampersands and angle brackets in some Gtk::MessageDialogs.
Closes #6306.
This commit is contained in:
Lawrence Lee
2021-08-15 12:23:29 -07:00
parent 22f89bc752
commit d3b67c1e22
7 changed files with 14 additions and 14 deletions

View File

@@ -879,7 +879,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m)
} else {
// Target directory creation failed, we clear the darkFramesPath setting
options.rtSettings.darkFramesPath.clear();
Glib::ustring msg_ = Glib::ustring::compose (M("MAIN_MSG_PATHDOESNTEXIST"), options.rtSettings.darkFramesPath)
Glib::ustring msg_ = Glib::ustring::compose (M("MAIN_MSG_PATHDOESNTEXIST"), escapeHtmlChars(options.rtSettings.darkFramesPath))
+ "\n\n" + M("MAIN_MSG_OPERATIONCANCELLED");
Gtk::MessageDialog msgd (msg_, true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);
msgd.set_title(M("TP_DARKFRAME_LABEL"));
@@ -955,7 +955,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m)
} else {
// Target directory creation failed, we clear the flatFieldsPath setting
options.rtSettings.flatFieldsPath.clear();
Glib::ustring msg_ = Glib::ustring::compose (M("MAIN_MSG_PATHDOESNTEXIST"), options.rtSettings.flatFieldsPath)
Glib::ustring msg_ = Glib::ustring::compose (M("MAIN_MSG_PATHDOESNTEXIST"), escapeHtmlChars(options.rtSettings.flatFieldsPath))
+ "\n\n" + M("MAIN_MSG_OPERATIONCANCELLED");
Gtk::MessageDialog msgd (msg_, true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);
msgd.set_title(M("TP_FLATFIELD_LABEL"));