diff --git a/src/Base/Persistence.cpp b/src/Base/Persistence.cpp index 6110555700..8a90f858c7 100644 --- a/src/Base/Persistence.cpp +++ b/src/Base/Persistence.cpp @@ -139,7 +139,7 @@ std::string Persistence::validateXMLString(const std::string& str) std::u32string cp_out; cp_out.reserve(cp_in.size()); for (auto cp : cp_in) { - if (std::any_of(validRanges.begin(), validRanges.end(), [cp](const auto& range){ + if (std::any_of(validRanges.begin(), validRanges.end(), [cp](const auto& range) { return cp >= range.first && cp <= range.second; })) { cp_out += cp; diff --git a/src/Mod/Test/Document.py b/src/Mod/Test/Document.py index 09cf409878..8c32849489 100644 --- a/src/Mod/Test/Document.py +++ b/src/Mod/Test/Document.py @@ -668,7 +668,7 @@ class DocumentBasicCases(unittest.TestCase): def testValidateXml(self): self.Doc.openTransaction("Add") - obj = self.Doc.addObject("App::FeatureTest","Label") + obj = self.Doc.addObject("App::FeatureTest", "Label") obj.Label = "abc\x01ef" TempPath = tempfile.gettempdir() SaveName = TempPath + os.sep + "CreateTest.FCStd"