+2009-06-28 20:49 -0700 Brendan Cully <brendan@kublai.com> (298194c414f0)
+
+ * configure.ac, curs_lib.c: Allow tabs in index subject. Closes #3270.
+
+2009-06-28 20:21 -0700 Brendan Cully <brendan@kublai.com> (ecea9568202f)
+
+ * imap/util.c: Allow ImapDelimChars to be unset
+
2009-06-28 19:21 -0700 Brendan Cully <brendan@kublai.com> (ef6523d11f24)
* mutt.h: Rename struct thread to struct mutt_thread. Closes #3279.
return ciss_parse_userhost (ciss, tmp);
}
-static int bad_username (char c)
-{
- return strchr ("/:%", c) != NULL;
-}
-
-static int bad_path (char c)
-{
- return (c <= 0x20 || c >= 0x7f || strchr ("\"<>#%{}|\\^~[]`", c)) ? 1 : 0;
-}
-
-static void url_pct_encode (char *dst, size_t l, const char *src, int (*bad) (char))
+static void url_pct_encode (char *dst, size_t l, const char *src)
{
static const char *alph = "0123456789ABCDEF";
l--;
while (src && *src && l)
{
- if (bad (*src) && l > 3)
+ if (strchr ("/:%", *src) && l > 3)
{
*dst++ = '%';
*dst++ = alph[(*src >> 4) & 0xf];
if (ciss->user)
{
char u[STRING];
- url_pct_encode (u, sizeof (u), ciss->user, bad_username);
+ url_pct_encode (u, sizeof (u), ciss->user);
if (flags & U_DECODE_PASSWD && ciss->pass)
{
char p[STRING];
- url_pct_encode (p, sizeof (p), ciss->pass, bad_username);
+ url_pct_encode (p, sizeof (p), ciss->pass);
snprintf (dest, len, "%s:%s@", u, p);
}
else
}
if (ciss->path)
- {
- char p[STRING];
- url_pct_encode (p, sizeof (p), ciss->path, bad_path);
- safe_strcat (dest, len, p);
- }
+ safe_strcat (dest, len, ciss->path);
return 0;
}
return rc;
}
-void url_encode_path (char *dest, size_t len, const char *src)
-{
- len--;
- url_pct_encode (dest, len, src, bad_path);
- dest[len] = 0;
-}
int url_parse_ciss (ciss_url_t *ciss, char *src);
int url_ciss_tostring (ciss_url_t* ciss, char* dest, size_t len, int flags);
int url_parse_mailto (ENVELOPE *e, char **body, const char *src);
-void url_encode_path (char *dest, size_t len, const char *src);
#endif