Values can be enclosed by quotes in assignments
Thus, passwords with leading/trailing spaces can be typed.
Examples:
set password = " with spaces "
set password = "with "quotes""
--- a/mcabber/src/settings.c Mon Jul 18 21:27:08 2005 +0100
+++ b/mcabber/src/settings.c Mon Jul 18 21:47:05 2005 +0100
@@ -119,6 +119,12 @@
if (t < val) return TRUE; // no value (variable reset for example)
+ // If the value begins and ends with quotes ("), these quotes are
+ // removed and whitespace is not stripped
+ if ((t>val) && (*val == '"' && *t == '"')) {
+ val++;
+ t--;
+ }
*pval = g_strndup(val, t+1-val);
return TRUE;
}