mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-18 07:22:53 +00:00
gui1: Escape filenames in the file_menu menu that may contain WML formatting
This prepends font::NULL_MARKUP to file_menu menu entries so that any WML formatting characters at the start of filenames such as "#foo.map" ('#' -> red font format specifier) are ignored.
This commit is contained in:
parent
cd8c83532b
commit
41b666fbfe
@ -105,6 +105,9 @@ Version 1.11.7+dev:
|
||||
* Added wmllint code for recognizing unit id fields in macros.
|
||||
* Refactored code in wmltools to create a macro-parsing function.
|
||||
* Added era descriptions.
|
||||
* Fixed file chooser dialog (used in the map editor and for locating the
|
||||
wesnothd executable) interpreting special markup at the beginning of file
|
||||
names such as "#foo.map".
|
||||
|
||||
Version 1.11.7:
|
||||
* Add-ons client:
|
||||
|
@ -61,11 +61,11 @@ void file_menu::display_current_files() {
|
||||
for (it = dirs_in_current_dir_.begin(); it != dirs_in_current_dir_.end(); ++it) {
|
||||
// Add an image to show that these are directories.
|
||||
std::stringstream ss;
|
||||
ss << font::IMAGE << dir_picture << COLUMN_SEPARATOR << *it;
|
||||
ss << font::IMAGE << dir_picture << COLUMN_SEPARATOR << font::NULL_MARKUP << *it;
|
||||
to_show.push_back(ss.str());
|
||||
}
|
||||
for (it = files_in_current_dir_.begin(); it != files_in_current_dir_.end(); ++it) {
|
||||
const std::string display_string = COLUMN_SEPARATOR + *it;
|
||||
const std::string display_string = COLUMN_SEPARATOR + std::string(1, font::NULL_MARKUP) + *it;
|
||||
to_show.push_back(display_string);
|
||||
}
|
||||
const int menu_font_size = font::SIZE_NORMAL; // Known from menu.cpp.
|
||||
|
Loading…
x
Reference in New Issue
Block a user