htacg / tidy-html5

The granddaddy of HTML tools, with support for modern standards
http://www.html-tidy.org
2.72k stars 420 forks source link

Detect: The “select” element cannot have more than one selected “option” descendant unless the “multiple” attribute is specified. #670

Open jidanni opened 6 years ago

jidanni commented 6 years ago

Really should catch this,

... <option value="/account/record.html?recordType=4&amp;symbol=8"
   selected="selected">
    ETC Withdrawal
   </option>

   <option value="/account/record.html?recordType=4&amp;symbol=9"
   selected="selected">
    BTG Withdrawal
   </option>...

Sorry Debian is behind, $ tidy --version HTML Tidy for Linux version 5.2.0

geoffmcl commented 6 years ago

@jidanni thanks for the issue...

Yes, it certainly seems, without the multiple option, there should only be one selected option... and this problem persists with the latest 5.7.3 Tidy version...

Any help finding a fix for this would be much appreciated... comments, patch, PR welcome... thanks...