mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-26 07:33:47 +00:00
Make address parsing more robust
* lisp/mail/ietf-drums.el (ietf-drums-parse-address): Don't bug out on addresses like (ietf-drums-parse-address "\"Foo \"bar\" <larsi@gnus.org>") (bug#18572).
This commit is contained in:
parent
e0e95199b9
commit
27accec970
@ -192,6 +192,17 @@ the Content-Transfer-Encoding header of a mail."
|
|||||||
(ietf-drums-init string)
|
(ietf-drums-init string)
|
||||||
(while (not (eobp))
|
(while (not (eobp))
|
||||||
(setq c (char-after))
|
(setq c (char-after))
|
||||||
|
;; If we have an uneven number of quote characters,
|
||||||
|
;; `forward-sexp' will fail. In these cases, just delete the
|
||||||
|
;; final of these quote characters.
|
||||||
|
(when (and (eq c ?\")
|
||||||
|
(not
|
||||||
|
(save-excursion
|
||||||
|
(ignore-errors
|
||||||
|
(forward-sexp 1)
|
||||||
|
t))))
|
||||||
|
(delete-char 1)
|
||||||
|
(setq c (char-after)))
|
||||||
(cond
|
(cond
|
||||||
((or (eq c ? )
|
((or (eq c ? )
|
||||||
(eq c ?\t))
|
(eq c ?\t))
|
||||||
|
Loading…
Reference in New Issue
Block a user