Skip to content

Commit

Permalink
FIX: cannot open saved 3mf with & in model name
Browse files Browse the repository at this point in the history
STUDIO-3690

Change-Id: I44cbccf6692910f7cbf331a6cea4f05caa25c45a
  • Loading branch information
zhimin-zeng-bambulab authored and lanewei120 committed Jul 31, 2023
1 parent 9d96731 commit f542b63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libslic3r/Format/bbs_3mf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3422,7 +3422,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)

bool _BBS_3MF_Importer::_handle_start_component(const char** attributes, unsigned int num_attributes)
{
std::string path = bbs_get_attribute_value_string(attributes, num_attributes, PPATH_ATTR);
std::string path = xml_unescape(bbs_get_attribute_value_string(attributes, num_attributes, PPATH_ATTR));
int object_id = bbs_get_attribute_value_int(attributes, num_attributes, OBJECTID_ATTR);
Transform3d transform = bbs_get_transform_from_3mf_specs_string(bbs_get_attribute_value_string(attributes, num_attributes, TRANSFORM_ATTR));

Expand Down Expand Up @@ -6295,7 +6295,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
if (ppath->empty())
stream << " <" << COMPONENT_TAG << " objectid=\"" << volume_id; // << "\"/>\n";
else
stream << " <" << COMPONENT_TAG << " p:path=\"" << *ppath << "\" objectid=\"" << volume_id; // << "\"/>\n";
stream << " <" << COMPONENT_TAG << " p:path=\"" << xml_escape(*ppath) << "\" objectid=\"" << volume_id; // << "\"/>\n";
const Transform3d &transf = volume->get_matrix();
stream << "\" " << TRANSFORM_ATTR << "=\"";
for (unsigned c = 0; c < 4; ++c) {
Expand Down

0 comments on commit f542b63

Please sign in to comment.