🌱 HTML validation

#reference/code

Browser bookmark to validate DOM of current page http://html5.validator.nu

javascript:(function(){%20var%20str%20=%20'';%20if%20(document.innerHTML)%20str%20+=%20document.innerHTML;%20else%20{%20if%20(document.doctype)%20{%20str%20+=%20'<!DOCTYPE%20';%20str%20+=%20document.doctype.name;%20if%20(document.doctype.publicId)%20{%20str%20+=%20'%20PUBLIC%20"'%20+%20document.doctype.publicId%20+%20'"';%20if%20(document.doctype.systemId)%20str%20+=%20'%20"'%20+%20document.doctype.systemId%20+%20'"';%20}%20else%20if%20(document.doctype.systemId)%20{%20str%20+=%20'%20SYSTEM%20"'%20+%20document.doctype.systemId%20+%20'"';%20}%20str%20+=%20'>\n';%20}%20var%20dummy%20=%20document.createElementNS('http://www.w3.org/1999/xhtml',%20'div');%20dummy.appendChild(document.documentElement);%20str%20+=%20dummy.innerHTML;%20}%20var%20form%20=%20document.createElementNS('http://www.w3.org/1999/xhtml',%20'form');%20form.enctype%20=%20'multipart/form-data';%20form.method%20=%20'post';%20form.acceptCharset%20=%20'utf-8';%20form.action%20=%20'https://html5.validator.nu/';%20form.innerHTML%20=%20'<input%20name="parser"/><input%20name="showsource"%20value="yes"/><textarea%20name="content"></textarea>';%20form.parser.value%20=%20document.createElement('div').tagName%20==%20'DIV'%20?%20'html'%20:%20'xml';%20form.content.value%20=%20str;%20if%20(document.documentElement)%20document.documentElement.appendChild(form);%20else%20document.appendChild(form);%20form.submit();%20})()

2016-06-20

Node package https://www.npmjs.com/package/w3cjs

node validate.js http://centralbank.com/business-services/loans-borrowing/corporate-card-services/visa-business-debit-card/ > ~/Desktop/foo.txt

Redirecting stdout http://stackoverflow.com/questions/32719923/redirecting-stdout-to-file-nodejs

Made by Brandon . If you find this project useful you can donate.