On Wed, Mar 03, 2010 at 11:20:25PM +0100, Vlastimil Ott wrote:
> Hello all,
> trying to send the page in a mail. I use Mandriva Linux, KMail for mailing. 
> Zim runs a script called 
> xdg-email, this is a FreeDesktop.org standard. When I click File | Send, 
> KMail's composer pops up. 
> However the page text doesn't fill the email body but addressee. Some tens of 
> addressees are 
> created. It seems that the script does not receive the correct arguments. It 
> has some parameters 
> like --body or --subject but I don't know where to set them up. Any help?

zim url_encodes the whole mailto-link, so also the ? which separates
mailto: from subject= is replaced by "%3F".

A patch for seperate url_encoding of the two parameters is attached (but
for some pages, I still don't get the whole body. Will look at this

@Japp: do you prefere the launchpad merge request feature for small
patches like these?

best regards,

=== modified file 'zim/gui/__init__.py'
--- zim/gui/__init__.py	2010-02-26 22:18:42 +0000
+++ zim/gui/__init__.py	2010-03-04 07:56:50 +0000
@@ -886,7 +886,8 @@
 	def email_page(self):
 		text = ''.join(self.page.dump(format='plain'))
-		url = url_encode('mailto:?subject=%s&body=%s' % (self.page.name, text))
+		url = 'mailto:?subject=%s&body=%s' % (url_encode(self.page.name), 
+				url_encode(text))
 	def import_page(self):

Mailing list: https://launchpad.net/~zim-wiki
Post to     : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp

Reply via email to