diff options
author | Austin Clements <amdragon@MIT.EDU> | 2013-10-11 09:53:39 -0400 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2013-10-27 09:31:29 -0300 |
commit | a7964c86d12558396cda0f297ebf8dcc602bab61 (patch) | |
tree | 78ecab23c0e1c44f6b24162c9abf74788876c8a8 /emacs/notmuch.el | |
parent | 45444eebe5c618d08ab168c49201bcd3cc235506 (diff) |
emacs: Sanitize authors and subjects in search and show
Authors and subjects can contain embedded, encoded control characters
like "\n" and "\t" that mess up display. Transform control characters
into spaces everywhere we display them in search and show.
Diffstat (limited to 'emacs/notmuch.el')
-rw-r--r-- | emacs/notmuch.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 60812455..d0cd9061 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -811,11 +811,13 @@ non-authors is found, assume that all of the authors match." (plist-get result :total))) 'face 'notmuch-search-count))) ((string-equal field "subject") - (insert (propertize (format format-string (plist-get result :subject)) + (insert (propertize (format format-string + (notmuch-sanitize (plist-get result :subject))) 'face 'notmuch-search-subject))) ((string-equal field "authors") - (notmuch-search-insert-authors format-string (plist-get result :authors))) + (notmuch-search-insert-authors + format-string (notmuch-sanitize (plist-get result :authors)))) ((string-equal field "tags") (let ((tags (plist-get result :tags))) |