mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-09-20 05:43:14 +08:00
FIX:illegal plate name should include escape characters
jira: STUDIO-8511 Change-Id: I4ce2b40117b80d98d004d99757b7d74f7ad5b5ec
This commit is contained in:
parent
993e2a24c1
commit
f475893243
@ -200,13 +200,18 @@ bool Plater::has_illegal_filename_characters(const std::string& name)
|
||||
for (size_t i = 0; i < std::strlen(illegal_characters); i++)
|
||||
if (name.find_first_of(illegal_characters[i]) != std::string::npos)
|
||||
return true;
|
||||
|
||||
std::array<std::string, 5> escape_characters = {"<", ">", "&", """, "'"};
|
||||
for (auto escape : escape_characters) {
|
||||
if (boost::contains(name, escape)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Plater::show_illegal_characters_warning(wxWindow* parent)
|
||||
{
|
||||
show_error(parent, _L("Invalid name, the following characters are not allowed:") + " <>:/\\|?*\"");
|
||||
show_error(parent, _L("Invalid name, the following characters are not allowed:") + " <>:/\\|?*\"" +_L("(Including its escape characters)"));
|
||||
}
|
||||
|
||||
enum SlicedInfoIdx
|
||||
|
Loading…
x
Reference in New Issue
Block a user