如何避免HTML5中HREF/MAILTO的验证错误

如何避免HTML5中HREF/MAILTO的验证错误,html,validation,mailto,Html,Validation,Mailto,我正在使用HTML5,我得到了一个验证错误元素a上的属性href的错误值:scheme data中的非法字符:不允许使用空格。从[. 代码的功能与预期一样,但我需要避免验证错误 <!DOCTYPE html> <html lang="en-US"> <head> <meta charset=utf-8> <title>My Page Title</title> </head> <bo

我正在使用HTML5,我得到了一个验证错误元素a上的属性href的错误值:scheme data中的非法字符:不允许使用空格。从[.
代码的功能与预期一样,但我需要避免验证错误

<!DOCTYPE html>
<html lang="en-US">
<head>
    <meta charset=utf-8>    
    <title>My Page Title</title>
</head>
<body>
    <h1>My Page Header</h1>
    <ul>
        <li class="block_left_380_text_18">
            Are you receiving our weekly Emails?&nbsp;&nbsp;
            Please 
            <a href="mailto:myemail@hotmail.com&amp;subject=Please add me to the Group 
            mailing list&amp;body=This request comes from the link on the website's 
            home page.%0D%0A
            My Name Is:%0D%0A
            My Street Address is:%0D%0A
            My City / State / Zip are:%0D%0A
            My Primary Phone is:%0D%0A
            My Primary Email (if different from the FROM field above):%0D%0A
            Other members of my household:">Click Here</a> 
            to send an Email to myemail@hotmail.com to be included.
        </li>
    </ul>
</body>
</html>

我的页面标题
我的页眉
  • 你收到我们每周的电子邮件了吗? 请 发送电子邮件给myemail@hotmail.com包括在内。
我已经多次使用MAILTO,但这是我第一次将它与Body参数一起使用。正如您所看到的,Body=元素中有很多空格。如果我用%20替换所有空格,验证程序会抱怨每行末尾的$OD%OA。
在正文有很多空格和CR/LF的地方,如何使用HREF/MAILTO?

问题在于HTML编辑器中的选项卡和返回(Dreamweaver CS6)为了可读性。在使用MAILTO时,似乎没有格式制表符或返回。在使用MAILTO时,我跳过了所有的斜杠、冒号等。在[]上通过验证的代码如下所示:

<!DOCTYPE html>
<html lang="en-US">
<head>
    <meta charset=utf-8>    
    <title>My Page Title</title>
</head>
<body>
    <h1>My Page Header</h1>
    <ul>
        <li class="block_left_380_text_18">
            Are you receiving our weekly Emails?&nbsp;&nbsp;
            Please 
            <a href=
"mailto:myemail@hotmail.com&amp;subject=Please%20add%20me%20to%20the%20mailing%20list&amp;body=This%20request%20comes%20from%20the%20link%20on%20the%20home%20page.%0D%0AMy%20Name%20Is%3A%0D%0AMy%20Street%20Address%20is%3A%0D%0AMy%20City%20%2F%20State%20%2F%20Zip%20are%3A%0D%0AMy%20Primary%20Phone%20is%3A%0D%0AMy%20Primary%20Email%20(if%20different%20from%20the%20FROM%20field%20above)%3A%0D%0AOther%20members%20of%20my%20household%3A">
            Click Here
            </a> 
            to send an Email to myemail@hotmail.com to be included.
        </li>
    </ul>
</body>
</html>

我的页面标题
我的页眉
  • 你收到我们每周的电子邮件了吗? 请 发送电子邮件给myemail@hotmail.com包括在内。