Skip to content

Commit

Permalink
FIX: XML-escaping issue was due to use of old VTK (5.4)
Browse files Browse the repository at this point in the history
  • Loading branch information
timhutton committed Mar 28, 2012
1 parent c2e6838 commit 7ba98c7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 21 deletions.
8 changes: 1 addition & 7 deletions Ready/BaseRD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,7 @@ vtkSmartPointer<vtkXMLDataElement> BaseRD::GetAsXML() const
// description
vtkSmartPointer<vtkXMLDataElement> description = vtkSmartPointer<vtkXMLDataElement>::New();
description->SetName("description");
ostringstream oss;
//#if defined(unix) || defined(__unix__) || defined(__unix)
// vtkXMLUtilities::EncodeString(this->GetDescription().c_str(),VTK_ENCODING_UNKNOWN,oss,VTK_ENCODING_UNKNOWN,true);
//#else
oss << this->GetDescription();
//#endif
description->SetCharacterData(oss.str().c_str(),(int)oss.str().length());
description->SetCharacterData(this->GetDescription().c_str(),(int)this->GetDescription().length());
rd->AddNestedElement(description);

// initial pattern generator
Expand Down
8 changes: 1 addition & 7 deletions Ready/OpenCL_Formula.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,7 @@ vtkSmartPointer<vtkXMLDataElement> OpenCL_Formula::GetAsXML() const
vtkSmartPointer<vtkXMLDataElement> formula = vtkSmartPointer<vtkXMLDataElement>::New();
formula->SetName("formula");
formula->SetIntAttribute("number_of_chemicals",this->GetNumberOfChemicals());
ostringstream oss;
//#if defined(unix) || defined(__unix__) || defined(__unix)
// vtkXMLUtilities::EncodeString(this->GetFormula().c_str(),VTK_ENCODING_UNKNOWN,oss,VTK_ENCODING_UNKNOWN,true);
//#else
oss << this->GetFormula();
//#endif
formula->SetCharacterData(oss.str().c_str(),(int)oss.str().length());
formula->SetCharacterData(this->GetFormula().c_str(),(int)this->GetFormula().length());
rule->AddNestedElement(formula);

return rd;
Expand Down
8 changes: 1 addition & 7 deletions Ready/OpenCL_FullKernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,7 @@ vtkSmartPointer<vtkXMLDataElement> OpenCL_FullKernel::GetAsXML() const
kernel->SetIntAttribute("block_size_x",this->block_size[0]);
kernel->SetIntAttribute("block_size_y",this->block_size[1]);
kernel->SetIntAttribute("block_size_z",this->block_size[2]);
ostringstream oss;
//#if defined(unix) || defined(__unix__) || defined(__unix)
// vtkXMLUtilities::EncodeString(this->GetFormula().c_str(),VTK_ENCODING_UNKNOWN,oss,VTK_ENCODING_UNKNOWN,true);
//#else
oss << this->GetFormula();
//#endif
kernel->SetCharacterData(oss.str().c_str(),(int)oss.str().length());
kernel->SetCharacterData(this->GetFormula().c_str(),(int)this->GetFormula().length());
rule->AddNestedElement(kernel);

return rd;
Expand Down

0 comments on commit 7ba98c7

Please sign in to comment.