mailto:问题

Mat*_*hew 0 html xhtml

我正在尝试设置以下mailto:link:

<a href='mailto:info@example.com?subject=Testing&body=http://www.google.com?foo=1&bar=2'>Send mail</a>
Run Code Online (Sandbox Code Playgroud)

然而,第二个参数(bar)被切断,因为它被视为mailto链接的参数而不是我正在放入正文的链接.我试过&amp;但它做了同样的事情,因为它被渲染到链接中.

Pas*_*TIN 7

这样的事情怎么样:

<a href='mailto:info@example.com?subject=Testing&amp;body=http%3A%2F%2Fwww.google.com%3Ffoo%3D1%26bar%3D2'>Send mail</a>
Run Code Online (Sandbox Code Playgroud)

即,urlencoding整个body字段,以确保没有任何问题导致?