mirror of
https://github.com/ratspeak/ratdeck.git
synced 2026-05-15 11:55:13 +00:00
sanitizeName: allow forward slash in display names
Sideband/Columba and other LXMF clients commonly include "/" in display names (e.g. handle/path conventions). The allowlist in sanitizeName stripped it, mangling "alice/columba" into "alicecolumba". Saved contacts get re-sanitized on each load (line 393), so existing names also lose the slash on next boot.
This commit is contained in:
@@ -82,7 +82,7 @@ static std::string sanitizeName(const std::string& raw, size_t maxLen = 16) {
|
||||
for (char c : raw) {
|
||||
if (clean.size() >= maxLen) break;
|
||||
if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') ||
|
||||
(c >= '0' && c <= '9') || c == ' ' || c == '-' || c == '_' || c == '.' || c == '\'') {
|
||||
(c >= '0' && c <= '9') || c == ' ' || c == '-' || c == '_' || c == '.' || c == '\'' || c == '/') {
|
||||
clean += c;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user