send-email: align RFC 2047 decoding more closely with the spec
commit11f70a7e29ff7167e89aad186d763a4b017e48d9
authorРоман Донченко <dpb@corrigendum.ru>
Sun, 14 Dec 2014 15:59:46 +0000 (14 18:59 +0300)
committerJunio C Hamano <gitster@pobox.com>
Mon, 15 Dec 2014 17:06:39 +0000 (15 09:06 -0800)
tree605fb0632611058e5766072451dfd17aa4920a04
parent76f8611a5fb7e81c1bada0fb190d573a66fc03f6
send-email: align RFC 2047 decoding more closely with the spec

More specifically:

* Add "\" to the list of characters not allowed in a token (see RFC 2047
  errata).

* Share regexes between unquote_rfc2047 and is_rfc2047_quoted. Besides
  removing duplication, this also makes unquote_rfc2047 more stringent.

* Allow both "q" and "Q" to identify the encoding.

* Allow lowercase hexadecimal digits in the "Q" encoding.

And, more on the cosmetic side:

* Change the "encoded-text" regex to exclude rather than include characters,
  for clarity and consistency with "token".

Signed-off-by: Роман Донченко <dpb@corrigendum.ru>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl