Ashan Ashan - 1 month ago 5
HTML Question

HTML mailto subject with '&'

I need set subject to '&' sign from client side html.
I have following code,

<a href=" chocolate&Body=get free hurry.">example</a>

i need to set email subject :
free chocolate & cake

how to do this ?


You need to URL-encode the text; so it becomes:

<a href=" chocolate %26 cake&Body=get free hurry.">example

%26 is the Url-encoded representation of &