2016-08-04 20 views
4

我試圖讓Gmail收件箱操作的標記正確以重置密碼。我正在使用Email Markup TesterGmail收件箱查看操作 - 「網址字段的值是必需的。」

我的標記看起來是這樣的:

<div itemscope itemtype="http://schema.org/EmailMessage"> 
    <meta itemprop="description" content="Reset password instructions"/> 
    <div itemprop="potentialAction" itemscope itemtype="http://schema.org/ViewAction"> 
    <meta itemprop="target" content="https://www.example.com/users/password/new?token=123"/> 
    <meta itemprop="name" content="Reset Your Password"/> 
    </div> 
    <meta itemprop="description" content="Visit our site to reset your password."/> 
</div> 

上面標記返回錯誤:

A value for the url field is required.

但我無法弄清楚,url領域應如何插入標記。即使Google's example未能通過其標記驗證程序。

回答

2

(不知道這只是一個錯誤與他們的測試工具,或者如果這是真的,這不是記錄了新的要求。)

你可以提供url財產in additiontarget財產。另請注意,如果值爲URL,則have to使用link元素(而不是meta元素)。

因此,這將是:

<link itemprop="target url" href="https://www.example.com/users/password/new?token=123" /> 

這在谷歌的電子郵件標記測試報告沒有任何錯誤。

相關問題