MP Create Game: escape any formatting applied to game name
This is a good point since it ensures any place that might use the title before the lobby (don't think there's any such places right now) won't inadvertently get formatted. Also might be worth looking into a way to just strip formatting completely.
This commit is contained in:
parent
c92e167a14
commit
58a2e23a0c
1 changed files with 2 additions and 1 deletions
|
@ -33,6 +33,7 @@
|
|||
#else
|
||||
#include "gui/widgets/listbox.hpp"
|
||||
#endif
|
||||
#include "font/pango/escape.hpp"
|
||||
#include "formatter.hpp"
|
||||
#include "formula/string_utils.hpp"
|
||||
#include "game_config.hpp"
|
||||
|
@ -948,7 +949,7 @@ void mp_create_game::post_show(window& window)
|
|||
config_engine_->set_options(options_manager_->get_options_config());
|
||||
|
||||
// Set game name
|
||||
const std::string name = find_widget<text_box>(&window, "game_name", false).get_value();
|
||||
const std::string name = font::escape_text(find_widget<text_box>(&window, "game_name", false).get_value());
|
||||
if(!name.empty() && (name != ng::configure_engine::game_name_default())) {
|
||||
config_engine_->set_game_name(name);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue