From ae51450ea64970dcdc544185d68e1e73fb390caa Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Tue, 1 Jul 2014 20:33:41 +0200 Subject: Fix reading of XDG style semicolon separated lists with escaped ';' Previously the warning "Invalid escape sequence "\;"." would appear and "\;" was replaced with just the backslash as is done for all unrecognized escape sequences. Keep both characters so that readXdgListEntry() works with values containing semicolons REVIEW: 119074 --- src/core/kconfigini.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/core/kconfigini.cpp b/src/core/kconfigini.cpp index 1a8bb771..856b7b76 100644 --- a/src/core/kconfigini.cpp +++ b/src/core/kconfigini.cpp @@ -792,6 +792,12 @@ void KConfigIniBackend::printableToString(BufferFragment *aString, const QFile & case '\\': *r = '\\'; break; + case ';': + // not really an escape sequence, but allowed in .desktop files, don't strip '\;' from the string + *r = '\\'; + r++; + *r = ';'; + break; case 'x': if (i + 2 < l) { *r = charFromHex(str + i + 1, file, line); -- cgit v1.2.1