(*** This bug was imported into bugs.kde.org ***) Package: kmail Version: 1.4 (using KDE 3.0.0 ) Severity: normal Installed from: SuSE Compiler: gcc version 2.95.3 20010315 (SuSE) OS: Linux (i686) release 2.2.19 OS/Compiler notes: When I add folders with special characters ('[' and ']') the folder properties are not saved or restored correctly. (Submitted via bugs.kde.org) (Called from KBugReport dialog)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 15 April 2002 22:46 zehender@kde.org wrote: > When I add folders with special characters ('[' and ']') the folder > properties are not saved or restored correctly. This is most likely a bug in KConfig. It seems that KConfig has problems=20 with ']' in group names. Regards Ingo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD4DBQE8u0WXGnR+RTDgudgRAkRZAJjFlK0pfOaWH3iTqpd4086gUhFvAJ9kPmvv O5vPe3cTb+VGqlcojYJTWw=3D=3D =3DlNeZ -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 15 April 2002 23:26 Ingo Kl=F6cker wrote: > On Monday 15 April 2002 22:46 zehender@kde.org wrote: > > When I add folders with special characters ('[' and ']') the > > folder properties are not saved or restored correctly. > > This is most likely a bug in KConfig. It seems that KConfig has > problems with ']' in group names. According to Waldo brackets are not allowed in config group names. This=20 means we will either have to change the way we store information about=20 the folders (i.e. use [Folder-#1] instead of [Folder-inbox]) or we will=20 have to escape brackets in folder names e.g. [ <-> %( ] <-> %) % <-> %% Regards Ingo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8u1Q4GnR+RTDgudgRAld8AKCmI6+/6u2P4y+jGVa++ZmhbP/Y3ACeIEGB N8AzBYvMko0eJVqQ1XaF4u0=3D =3Dqz6i -----END PGP SIGNATURE-----
*** Bug 46625 has been marked as a duplicate of this bug. ***
loss of config data
CVS commit by tilladam: Escape [ and ] in folder names to %( and %) when queried via idString() because they are not allowed in kconfig section names. CCMAIL: 41066-done@bugs.kde.org M +6 -1 kmfolder.cpp 1.284 --- kdepim/kmail/kmfolder.cpp #1.283:1.284 @@ -899,5 +899,10 @@ QString KMFolder::idString() const if (!relativePath.isEmpty()) relativePath = relativePath.right( relativePath.length() - 1 ) + "/"; - return relativePath + QString(name()); + QString escapedName = QString( name() ); + /* Escape [ and ] as they are disallowed for kconfig sections and that is + what the idString is primarily used for. */ + escapedName.replace( "[", "%(" ); + escapedName.replace( "]", "%)" ); + return relativePath + escapedName; }