git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC 0/1] de-quote quoted-strings in mailinfo

From
Kevin Daudt <me@ikke.info>
Date
Sep 13, 2016, 23:46 UTC
Message-ID
<20160913234612.22806-1-me@ikke.info>
In-Reply-To
<20160913152622.2xtyn6mki6p6afsg@sigill.intra.peff.net>
This is my first 'big' C patch, so first an RFC. 

This patch implements RFC2822 dequoting of quoted-pairs in quoted strings, which was not done yet. This means removing the "\" as escape character from header fields, but only quoted strings, and comments (text between braces).

According to the RFC, comments can also appear in square brackets in the e-mail domain, but that has not been implemented. In fact, just like other functions, it just looks at the whole header line.

Please let me know what you think.
Kevin Daudt (1):
  mailinfo: de-quote quoted-pair in header fields
 mailinfo.c                 | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 t/t5100-mailinfo.sh        |  5 +++++
 t/t5100/quoted-pair.expect |  5 +++++
 t/t5100/quoted-pair.in     |  9 +++++++++
 t/t5100/quoted-pair.info   |  5 +++++
 5 files changed, 70 insertions(+)
 create mode 100644 t/t5100/quoted-pair.expect
 create mode 100644 t/t5100/quoted-pair.in
 create mode 100644 t/t5100/quoted-pair.info
-- 
2.10.0.rc2
Previous: Jeff KingNext: Kevin Daudt
Message 3 of 16 in “git-am includes escape characters from 'From' field”
  1. Swift GeekSep 12, 2016
  2. Jeff KingSep 13, 2016
  3. 0/1 de-quote quoted-strings in mailinfoKevin Daudt, Sep 13, 2016
  4. 0/1 mailinfo: de-quote quoted-pair in header fieldsKevin Daudt, Sep 13, 2016
  5. Junio C HamanoSep 14, 2016
  6. Kevin DaudtSep 14, 2016
  7. Jeff KingSep 14, 2016
  8. Junio C HamanoSep 14, 2016
  9. Kevin DaudtSep 14, 2016
  10. Junio C HamanoSep 14, 2016
  11. Jeff KingSep 14, 2016
  12. Junio C HamanoSep 14, 2016
  13. Jeff KingSep 14, 2016
  14. Kevin DaudtSep 15, 2016
  15. Jeff KingSep 15, 2016
  16. Jeff KingSep 14, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.