about summary refs log tree commit diff
path: root/blaze822.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-06-13 17:18:05 +0200
committerLeah Neukirchen <leah@vuxu.org>2017-06-13 17:18:05 +0200
commit635dfe95adedb8525df1d0865918790cdb55c412 (patch)
treef5fdf71d66dea0bc59bcdec6d5350ccd6ea25cc4 /blaze822.c
parentea32b6a45ede22e34eb0fc3ca9c703466bc1799d (diff)
downloadmblaze-635dfe95adedb8525df1d0865918790cdb55c412.tar.gz
mblaze-635dfe95adedb8525df1d0865918790cdb55c412.tar.xz
mblaze-635dfe95adedb8525df1d0865918790cdb55c412.zip
blaze822: blaze822_addr: support backslashes in atoms
This happens a lot in the real world, even if it's not RFC conforming.
Diffstat (limited to 'blaze822.c')
-rw-r--r--blaze822.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/blaze822.c b/blaze822.c
index 0fcc276..5a6edd2 100644
--- a/blaze822.c
+++ b/blaze822.c
@@ -185,7 +185,7 @@ blaze822_addr(char *s, char **dispo, char **addro)
 			}
 			if (*s == '"')
 				s++;
-		} else if (*s == '(') {
+		} else if (*s == '(') {   // XXX recurse to conform?
 			s++;
 
 			if (!*addr) {	// assume: user@host (name)
@@ -202,6 +202,10 @@ blaze822_addr(char *s, char **dispo, char **addro)
 				*c++ = *s++;
 			if (*s == ')')
 				s++;
+		} else if (*s == '\\') {
+			s++;
+			if (*s)
+				*c++ = *s++;
 		} else if (*s == ':') {
 			s++;
 			while (iswsp(*s))