简体   繁体   English

在特定 div 中禁用 w3c 验证

[英]disable w3c validation in specific divs

is there a way to run a webpage through https://validator.w3.org/ while also ensuring that a particular div's contents will not be checked?有没有办法通过https://validator.w3.org/运行网页,同时确保不会检查特定 div 的内容?

On a certain page, I print an email that was scraped from gmail and display it exactly how it was obtained from gmail.在某个页面上,我打印了一个从 gmail刮取的 email,并准确显示它是如何从 gmail 获得的。 I would like to be able to validate all the html code around that email itself.我希望能够验证 email 本身周围的所有 html 代码。

No it's not possible to validate partial content in the page.不,无法验证页面中的部分内容。 With regards to your specific case you may have two solutions.关于您的具体情况,您可能有两种解决方案。

  1. Just validate the template with a dummy content in pre-production stage.只需在预生产阶段使用虚拟内容验证模板即可。
  2. insert the email in a programmatic way through an iframe通过 iframe 以编程方式插入 email

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM