Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ampersand in email address (href)

Im working with email address which has an ampersand in it, the user wants a 'contact us' link to open up a new message wit their address populated, I normally use href, but the ampersand is causing this not to work, any idea's?

here's what i have at the moment:

<a href="mailto:L&[email protected]? subject=MessageTitle&amp;" 
        style="font-family: Verdana; font-size: large; font-weight: bold; color: #800000">#GHA Organisation Development</a>
like image 458
DarkW1nter Avatar asked Dec 22 '22 04:12

DarkW1nter


1 Answers

Use &amp; instead of plain &. Your href URL is inside HTML so it needs to be escaped properly to be valid HTML.

like image 189
Konrad Rudolph Avatar answered Jan 15 '23 12:01

Konrad Rudolph