Not logged in. · Lost password · Register
Forum: General Help and Support Syntax and Usage RSS
Use of ampersand in mailto links
Avatar
critmcdonald #1
Member since May 2010 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: Use of ampersand in mailto links
I would like to use a mailto link that pulls in both a subject and body:

mailto:someone@gmail.com?Subject=This%20is%20the%20subject&Body=This%20is%20the%20body.

The problem is docuwiki replaces the ampersand with the html entity "&" Is there a way to escape that?
Avatar
critmcdonald #2
Member since May 2010 · 2 posts
Group memberships: Members
Show profile · Link to this post
Providing my own answer here:

We changed the a config file (http://www.dokuwiki.org/config) to allow html parsing.


$conf['htmlok']  = 1;


so we could format like this:

<html>
This is text. <a href="mailto:somone@gmail.com?Subject=The Subject&Body=This%20is%20the%20body.">Click here</a> to start your email.
<html>

and now the & isn't escaped since it is in an html block.
Avatar
turnermm (Moderator) #3
Member since Oct 2009 · 4629 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
htmlok is ok as long as your users are all trusted.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
gimili #4
User title: gimili
Member since May 2010 · 5 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #2
Thank you Critmcdonald!  That also solved my problem with an link that had a "|" in it.

I noticed that the one "/" is missing.

<html>
This is text. <a href="mailto:somone@gmail.com?Subject=The Subject&Body=This%20is%20the%20body.">Click here</a> to start your email.
<html>

Should be:

<html>
This is text. <a href="mailto:somone@gmail.com?Subject=The Subject&Body=This%20is%20the%20body.">Click here</a> to start your email.
</html>
Avatar
robertgalp #5
Member since May 2015 · 1 post
Group memberships: Members
Show profile · Link to this post
In reply to post #1
Hope this one will help you.....HTML Email

Robert
Avatar
hosting gia re #6
Member since Jun 2015 · 2 posts
Group memberships: Members
Show profile · Link to this post
<html>
This is text. <a href="mailto:somone@gmail.com...">Click here</a> to start your email.
</html>
Good luck to you.
Công ty chúng tôi chuyên cung cấp dịch vụ cho thuê vps gia re,
hosting gia re,
thue vps Chất lượng tốt nhất hiện nay.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-05-26, 21:38:59 (UTC +02:00)