blaze822: blaze822_addr: support backslashes in atoms

This happens a lot in the real world, even if it's not RFC conforming.
pull/37/head
Leah Neukirchen 7 years ago
parent ea32b6a45e
commit 635dfe95ad

@ -185,7 +185,7 @@ blaze822_addr(char *s, char **dispo, char **addro)
} }
if (*s == '"') if (*s == '"')
s++; s++;
} else if (*s == '(') { } else if (*s == '(') { // XXX recurse to conform?
s++; s++;
if (!*addr) { // assume: user@host (name) if (!*addr) { // assume: user@host (name)
@ -202,6 +202,10 @@ blaze822_addr(char *s, char **dispo, char **addro)
*c++ = *s++; *c++ = *s++;
if (*s == ')') if (*s == ')')
s++; s++;
} else if (*s == '\\') {
s++;
if (*s)
*c++ = *s++;
} else if (*s == ':') { } else if (*s == ':') {
s++; s++;
while (iswsp(*s)) while (iswsp(*s))

Loading…
Cancel
Save