local file link check only (/ vs \) absolute path

For technical support for all editions of CSS HTML Validator. Includes bug reports.
Post Reply
equalizer
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 2
Joined: Wed Jul 19, 2017 9:37 am

local file link check only (/ vs \) absolute path

Post by equalizer » Wed Jul 19, 2017 10:57 am

Real simple task here: Just testing html validator for local technical pubs with no internet connection. Each pub has html links that may reference other html links (chapter 1, 2, etc) that may then link to hundreds of gifs or pdf files.

When I run link check only I get Error(s): invalid backslash ('\') character in path (should be '/')

Error computing path (subfolder1\fig1.gif). These are all local files so links are not absolute and because windows files, the path name are
in format:
C:\pub1\chp1\Diagrams\fig1.gif

Weblinks are in format htmlvalidator.com/CSEForum with forward slash, whereas Windows files are back slash \.

What options do I change to validate local links that ignores absolute path error and just confirms that local gifs or pdf files are actually present.

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3222
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: local file link check only (/ vs \) absolute path

Post by Albert Wiersch » Wed Jul 19, 2017 12:50 pm

Hello,

Paths in HTML (like those specified by "href" and "src" attributes) should use the forward slash character. The browser will convert it to a backslash character if needed to access a local file.

If you change the backslash characters to forward slashes, then does it work and do your page links still work? I believe they should unless there is another issue.
Image
Albert Wiersch

equalizer
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 2
Joined: Wed Jul 19, 2017 9:37 am

Re: local file link check only (/ vs \) absolute path

Post by equalizer » Fri Jul 21, 2017 10:21 am

Yes, that worked. However, we have hundreds of books with this html code and not going to change.

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3222
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: local file link check only (/ vs \) absolute path

Post by Albert Wiersch » Sat Jul 22, 2017 2:27 pm

I could potentially add an option to address that in the link checker (but I wouldn't recommend it because it would better to fix the problem). Let me know if you would be interested in this approach.

You might also be able to use the Tidy tool to auto-fix that problem but I haven't tested it to see if it can fix that.
Image
Albert Wiersch

Post Reply