VM

vm-mail-mailto-url url-decodes "body" twice

Bug #1609068 reported by Göran Uddeborg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
VM
Fix Committed
Medium
Unassigned

Bug Description

If I do

(vm-mail-to-mailto-url "mailto:<email address hidden>?subject=g%25F6ran&body=g%25F6ran")

in the *scratch* buffer I get a mail window where the subject is g%F6ran but the body is göran.

I believe this is a bug in the vm-mail-to-mailto-url function. It first goes through all known arguments ("subject" "in-reply-to" "cc" "references" "newsgroups" "body") and stores their url-decoded values in local variables. Later it first inserts all the header fields with a simple "insert". And finally it inserts the body, but when it does, it calls "vm-url-decode-string" once more on the value.

So the obvious patch is to remove this latter call:

--- lisp/vm-reply.el~ 2012-03-05 18:43:21.000000000 +0100
+++ lisp/vm-reply.el 2016-08-02 19:20:13.000000000 +0200
@@ -1378,7 +1378,7 @@
       (if (null body)
          nil
        (mail-text)
- (save-excursion (insert (vm-url-decode-string body) "\n"))
+ (save-excursion (insert body "\n"))
        ;; CRLF to LF for line breaks in the body
        (while (search-forward "\r\n" nil t)
          (replace-match "\n"))))

Related branches

Revision history for this message
Uday Reddy (reddyuday) wrote :

Indeed, thanks for the fix!

Changed in vm:
status: New → Fix Committed
importance: Undecided → Medium
tags: added: 8.1 compatibility
Revision history for this message
Uday Reddy (reddyuday) wrote :

Rev. 1510.

Changed in vm:
milestone: none → 8.2.1a
Uday Reddy (reddyuday)
Changed in vm:
milestone: 8.2.1a → 8.2.90a
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.