简体   繁体   中英

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?

On a certain page, I print an email that was scraped from gmail and display it exactly how it was obtained from gmail. I would like to be able to validate all the html code around that email itself.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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