Hi,
I have the following mailto link on a page:
<a href="mailto:?subject=<?= $page->title() ?> | <?= $site->title() ?>&body=<?= $page->url() ?>">
Email
</a>
Which works fine until the $page->title()
contains an ampersand, at which point the subject is cut off. I know why this is, but am not sure what to use to manipulate $page->title()
to fix this. I tried urlencode
but then I get a load of +
symbols for the spaces.
What is the best way of going about this?