RE: Inconsistent results between https://validator.w3.org/nu and bookmarklet

Thank you, David. 

-----Original Message-----
From: David Dorward <david@dorward.me.uk> 
Sent: Monday, July 22, 2019 8:44 AM
To: Lisa Louise Davis (Aquent) <v-lidav@microsoft.com>
Cc: O'Guin, Jules D. <JDO09280@ccv.vsc.edu>; www-validator@w3.org; shadi@w3.org; wai@w3.org
Subject: Re: Inconsistent results between https://validator.w3.org/nu and bookmarklet



On 22 Jul 2019, at 16:06, Lisa Louise Davis (Aquent) wrote:

> (Original thread was False positives for "stray end tag" rule) Could 
> someone in this group help me understand the difference in results 
> when typing a test URL into https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvalidator.w3.org%2Fnu&amp;data=02%7C01%7Cv-lidav%40microsoft.com%7Ca16f911c2793479d7aac08d70ebb793a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636994070682806614&amp;sdata=s6G2osBSLf3cfGeQiqt0rDXPW36uqj%2BTAce7LLr2zHc%3D&amp;reserved=0 vs.
> running the Check serialized DOM of current 
> page<javascript:(function()%7bfunction%20c(a,b)%7bvar%20c=document.cre
> ateElement(%22textarea%22);c.name=a;c.value=b;d.appendChild(c)%7dvar%2
> 0e=function(a)%7bfor(var%20b=%22%22,a=a.firstChild;a;)%7bswitch(a.node
> Type)%7bcase%20Node.ELEMENT_NODE:b+=a.outerHTML;break;case%20Node.TEXT
> _NODE:b+=a.nodeValue;break;case%20Node.CDATA_SECTION_NODE:b+=%22%3c![C
> DATA[%22+a.nodeValue+%22]]\%3e%22;break;case%20Node.COMMENT_NODE:b+=%2
> 2%3c\!--%22+a.nodeValue+%22--\%3e%22;break;case%20Node.DOCUMENT_TYPE_N
> ODE:b+=%22%3c!DOCTYPE%20%22+a.name+%22%3e\n%22%7da=a.nextSibling%7dret
> urn%20b%7d(document),d=document.createElement(%22form%22);d.method=%22
> POST%22;d.action=%22https://validator.w3.org/nu/%22;d.enctype=%22multi
> part/form-data%22;d.target=%22_blank%22;d.acceptCharset=%22utf-8%22;c(
> %22showsource%22,%22yes%22);c(%22content%22,e);document.body.appendChi
> ld(d);d.submit()%7d)();> bookmarklet? The latter consistently 
> generates more issues.

Typing the URL into the validator causes it to test the HTML at that URL.

When you use the bookmarklet, you load the HTML into a browser which converts it into a DOM (which involves error recovery), then executes any JavaScript on the page (which could modify the DOM further), then you ask the browser to generate HTML from the DOM which you send to the validator.

Received on Monday, 22 July 2019 18:52:31 UTC