W3C home > Mailing lists > Public > www-validator-css@w3.org > October 2011

Add support for HTML files with the htm extension as the file name for the command line interface.

From: Lenahan, Peter <Peter_Lenahan@ibi.com>
Date: Wed, 5 Oct 2011 20:30:59 -0400
To: "www-validator-css@w3.org" <www-validator-css@w3.org>, "ylafon@w3.org" <ylafon@w3.org>
Message-ID: <9892EC6224DBC54598164D1F77721D751DDDBBB919@IBIUSMBSB.ibi.com>
When using the command line interface with the file:/   syntax.
When attempting to validate an html files that end in the extension  ".htm" the validator does not correctly recognize the file as an HTML file.

This change adds a test for the file suffix  ".htm"


Around line 58 add a test for the shorter extension.

            } else if (urlLower.endsWith(".htm") ||
                       urlLower.endsWith(".html") || urlLower.endsWith(".shtml") || urlLower.endsWith("/")) {

A test for this looks like this:

java -jar css-validator.jar  -vextwarning true -profile css3 file:/C:\workspace3_4\css-validator\testdata\testhtm.htm
Received on Thursday, 6 October 2011 00:31:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:01:10 UTC