根据规范,引号必须转义,即不能使用以下方式:
<iframe seamless sandbox srcdoc="<p>Yeah, you can see it <a href="/gallery?mode=cover&page=1">in my gallery</a>."></iframe>
我们应该使用:
<iframe seamless sandbox srcdoc="<p>Yeah, you can see it <a href="/gallery?mode=cover&amp;page=1">in my gallery</a>."></iframe>
但是在上面的例子中仅使用单引号不也可以吗:
<iframe seamless sandbox srcdoc="<p>Yeah, you can see it <a href='/gallery?mode=cover&page=1'>in my gallery</a>."></iframe>