screencopy: fix unescaped quotes in titles (#96)

This commit is contained in:
Commrade Goad 2023-09-17 00:51:54 +07:00 committed by GitHub
parent 2f48e65503
commit b645ab7cce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,6 +11,8 @@
std::string sanitizeNameForWindowList(const std::string& name) { std::string sanitizeNameForWindowList(const std::string& name) {
std::string result = name; std::string result = name;
if (result[0] == '\"')
result[0] = ' ';
for (size_t i = 1; i < result.size(); ++i) { for (size_t i = 1; i < result.size(); ++i) {
if (result[i - 1] == '>' && result[i] == ']') if (result[i - 1] == '>' && result[i] == ']')
result[i] = ' '; result[i] = ' ';