diff --git a/exml/Text.cpp b/exml/Text.cpp index 900978a..5aaaafa 100644 --- a/exml/Text.cpp +++ b/exml/Text.cpp @@ -29,11 +29,11 @@ static std::string replaceSpecialChar(const std::string& _inval) { static std::regex regexQUOT("""); static std::regex regexAMP("&"); - out = std::regex_replace(_inval, regexLT, "<"); - out = std::regex_replace(out, regexGT, ">"); - out = std::regex_replace(out, regexAPOS, "'"); - out = std::regex_replace(out, regexQUOT, "\""); - out = std::regex_replace(out, regexAMP, "&"); + out = std::regex_replace(_inval, regexLT, std::string("<")); + out = std::regex_replace(out, regexGT, std::string(">")); + out = std::regex_replace(out, regexAPOS, std::string("'")); + out = std::regex_replace(out, regexQUOT, std::string("\"")); + out = std::regex_replace(out, regexAMP, std::string("&")); //EXML_ERROR("plop "<< _inval << " => " << out); return out; } @@ -45,11 +45,11 @@ static std::string replaceSpecialCharOut(const std::string& _inval) { static std::regex regexAPOS("'"); static std::regex regexQUOT("\""); - out = std::regex_replace(_inval, regexAMP, "&"); - out = std::regex_replace(out, regexQUOT, """); - out = std::regex_replace(out, regexAPOS, "'"); - out = std::regex_replace(out, regexGT, ">"); - out = std::regex_replace(out, regexLT, "<"); + out = std::regex_replace(_inval, regexAMP, std::string("&")); + out = std::regex_replace(out, regexQUOT, std::string(""")); + out = std::regex_replace(out, regexAPOS, std::string("'")); + out = std::regex_replace(out, regexGT, std::string(">")); + out = std::regex_replace(out, regexLT, std::string("<")); return out; }