I am using window.location.href = 'mailto:?body=visit http://example.com/?content=link';
which works fine, but the way the link is built is window.location.href = 'mailto:?body=<?php echo $content; ?>';
now this works fine unless $content contains ' or something similar which breaks the code.
How can I make this work?