2011-05-29 12 views
2

ここで間違っていることを誰かが指摘できますか?悪い値mailto

Line 104, Column 43: Bad value mailto:?subject=Test&body=I found this today and i thought you might be intrested. URL/2011/05/test/ for attribute href on element a: Control character in query component. … URL/2011/05/test/">http://example.org/. Characters should be represented in NFC and spaces should be escaped as %20

そして、これは私はheader.phpの中で使用しているコードです:W3Cのバリデータでは、私はこのエラーを取得する

<div style="float:left; width:25px; height:25px; padding:5px; margin-left:3px;"> 
    <a href="mailto:?subject=<?php the_title_attribute() ?>&amp;body=I found this today and i thought you might be intrested. 
    <?php echo get_permalink(); ?>"><IMAGE SOURCE="<?php echo $template_url ?>/social/email-small.png" title="E-Mail"></a> 
</div> 

<!DOCTYPE html>の下でそのことが重要ならば。前もって感謝します。それは私が、私はちょうどURLとIMAGE SOURCE

+0

urlencodeあなたのmailtoコード – Ibu

+1

あなたの問題ではありませんが、あなたのコードでは「興味があります」が「intrested」と間違っています。 – icktoofay

+0

ありがとうicktoofay –

答えて

1

エンコードパラメータに置き換えリンクを破る作っ

申し訳ありません。

PHPではurlencode()を使用できます。

+0

ありがとうアレックスそれは私に投票をさせません –

+0

@ウェンディあなたはいつでも私にあなたが刻みを与えることができます:) – alex

0

あなたがそこに含むURLをエンコードするには、urlencode()を使用する必要があります。