mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-09 15:57:55 -06:00
FIX:Remove all spaces and special symbols in the plate name
Remove all spaces and special symbols like \ / : * ? " < > | in the plate name,allow xml special symbols such as & ' Change-Id: I2b391d13be709af0e47f1573c0e225e63591fd23 (cherry picked from commit 135c97e9916c852a8625d9d9bf0a4dda051b6e2b)
This commit is contained in:
parent
531757366e
commit
b849a82725
2 changed files with 11 additions and 8 deletions
|
@ -3838,7 +3838,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
m_curr_plater->plate_index = atoi(value.c_str());
|
||||
}
|
||||
else if (key == PLATER_NAME_ATTR) {
|
||||
m_curr_plater->plate_name = encode_path(value.c_str());
|
||||
m_curr_plater->plate_name = xml_unescape(encode_path(value.c_str()));
|
||||
}
|
||||
else if (key == LOCK_ATTR)
|
||||
{
|
||||
|
@ -6996,7 +6996,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
stream << " <" << PLATE_TAG << ">\n";
|
||||
//plate index
|
||||
stream << " <" << METADATA_TAG << " " << KEY_ATTR << "=\"" << PLATERID_ATTR << "\" " << VALUE_ATTR << "=\"" << plate_data->plate_index + 1 << "\"/>\n";
|
||||
stream << " <" << METADATA_TAG << " " << KEY_ATTR << "=\"" << PLATER_NAME_ATTR << "\" " << VALUE_ATTR << "=\"" << decode_path(plate_data->plate_name.c_str()) << "\"/>\n";
|
||||
stream << " <" << METADATA_TAG << " " << KEY_ATTR << "=\"" << PLATER_NAME_ATTR << "\" " << VALUE_ATTR << "=\"" << xml_escape(decode_path(plate_data->plate_name.c_str())) << "\"/>\n";
|
||||
stream << " <" << METADATA_TAG << " " << KEY_ATTR << "=\"" << LOCK_ATTR << "\" " << VALUE_ATTR << "=\"" << std::boolalpha<< plate_data->locked<< "\"/>\n";
|
||||
ConfigOption* bed_type_opt = plate_data->config.option("curr_bed_type");
|
||||
t_config_enum_names bed_type_names = ConfigOptionEnum<BedType>::get_enum_names();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue