Commit 48abace8 authored by Adam Krupicka's avatar Adam Krupicka
Browse files

Improve canonicalize-address to better handle possible whitespace

parent 54b994b7
...@@ -163,11 +163,12 @@ ...@@ -163,11 +163,12 @@
(defun canonicalize-address (address) (defun canonicalize-address (address)
"If address is in the form 'Name <address>', return only address.\ "If address is in the form 'Name <address>', return only address.\
Otherwise, return the original address." Otherwise, return the original address."
(let ((pos (search "<" address))) (let ((pos< (search "<" address))
(if pos (pos> (search ">" address)))
(if (and pos< pos>)
(subseq address (subseq address
(1+ pos) (1+ pos<)
(- (length address) 1)) pos>)
address))) address)))
(define-condition smtp-error (error) (define-condition smtp-error (error)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment