From 4a44ff5f138c8e6ef5cfbd97f7c11fca79e80dff Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Wed, 17 Mar 2010 02:51:21 +0000 Subject: [PATCH] (mml-read-tag): Unquote values with `read' to reverse prin1 in mml-insert-tag (just stripping the quotes gave wrong value if any backslash escapes). From Kevin Ryde . --- lisp/gnus/ChangeLog | 6 ++++++ lisp/gnus/mml.el | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 02a8513643f..f71c7a4300b 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,9 @@ +2010-03-17 Kevin Ryde + + * mml.el (mml-read-tag): Unquote values with `read' to reverse + prin1 in mml-insert-tag (just stripping the quotes gave wrong + value if any backslash escapes). + 2010-03-15 Katsumi Yamaoka * mm-util.el (mm-charset-to-coding-system): Use coding-system-from-name diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index 091a0ed90bd..87fcdf5b09c 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el @@ -392,8 +392,8 @@ A message part needs to be split into %d charset parts. Really send? " (skip-chars-forward "= \t\n") (setq val (buffer-substring-no-properties (point) (progn (forward-sexp 1) (point)))) - (when (string-match "^\"\\(.*\\)\"$" val) - (setq val (match-string 1 val))) + (when (string-match "\\`\"" val) + (setq val (read val))) ;; inverse of prin1 in mml-insert-tag (push (cons (intern elem) val) contents) (skip-chars-forward " \t\n")) (goto-char (match-end 0)) -- 2.39.2