changeset 107402:e003508e60b1

(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 <user42@zip.com.au>.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Wed, 17 Mar 2010 02:51:21 +0000
parents f5130b7f5581
children ef684a3be0f9
files lisp/gnus/ChangeLog lisp/gnus/mml.el
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Tue Mar 16 22:06:37 2010 +0000
+++ b/lisp/gnus/ChangeLog	Wed Mar 17 02:51:21 2010 +0000
@@ -1,3 +1,9 @@
+2010-03-17  Kevin Ryde  <user42@zip.com.au>
+
+	* 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  <yamaoka@jpl.org>
 
 	* mm-util.el (mm-charset-to-coding-system): Use coding-system-from-name
--- a/lisp/gnus/mml.el	Tue Mar 16 22:06:37 2010 +0000
+++ b/lisp/gnus/mml.el	Wed Mar 17 02:51:21 2010 +0000
@@ -392,8 +392,8 @@
       (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))