diff --git a/src/shared/ScreencopyShared.cpp b/src/shared/ScreencopyShared.cpp index 23a7bd4..0810fe7 100644 --- a/src/shared/ScreencopyShared.cpp +++ b/src/shared/ScreencopyShared.cpp @@ -11,13 +11,11 @@ std::string sanitizeNameForWindowList(const std::string& name) { std::string result = name; - if (result[0] == '\"') - result[0] = ' '; + std::replace(result.begin(), result.end(), '\'', ' '); + std::replace(result.begin(), result.end(), '\"', ' '); for (size_t i = 1; i < result.size(); ++i) { if (result[i - 1] == '>' && result[i] == ']') result[i] = ' '; - if (result[i] == '\"' || result[i] == '\'') - result[i] = ' '; } return result; }