Help! Links w/Lynx don't work

Bin Zhang bzhang at library.kcc.hawaii.edu
Tue Mar 18 13:48:02 EST 1997


Thomas Dowling wrote:
 > [Quoting Andrea Duda]
 > > >
 > > >...Apparently Netscape can handle URLs that are split across two
 > lines, but 
 > > >Lynx cannot.  When I edited the page so that URLs were on a single
 > line, 
 > > >Lynx was able to connect to all the search engines without a
 > problem...
 > > 
 > 
 > This suggests to me that Lynx is being somehow deficient in handling
 > URLs with white space in them.  The URL specification uses the term
 > "unsafe" for difficult characters like a space, rather than "illegal"
 > or "forbidden".  The spec says that all unsafe characters must be
 > encoded, but it doesn't offer any guidance on how to handle URLs that
 > include them anyway.  Since most host operating systems are capable of
 > managing files with spaces in their names, it's quite conceivable that
 > an author really would write a space into a URL (quick, who knows the
 > hex character triplet for a space?), and that a text editor would save
 > that space across a line break.  I'd rather my browser gave authors
 > credit for saying what they mean--even if they have problems with the
 > syntax--than to waste time and lines of code trying to guess what they
 > really meant.


Lynx CAN handle spaces within URLs.  It converts the line break
into a white space.  And I think Lynx's behavior is better than
Netscape's.  For example if I have this in my html file:

<a href="http://some.domain.name/some/directory/and/subdirectory/my
file.html">My file.html</a>

There is a space within the file name.  Most editors will natually break
the line at the sapce.

Netscape will interpret the file name as "myfile.html", and you
will get an "404 not found error".

Lynx will convert that line break into a space and you will get
correct page: "my file.html".

-- 
---------------------------------------------------------------------
Bin Zhang <bzhang at Hawaii.Edu>         4303 Diamond Head Road
Automation/Reference Librarian        Honolulu, HI 96816
Kapiolani Community College           Phone: (808) 734-9254
University of Hawaii                  Fax:   (808) 734-9453
----------------------------------------------------------------------




 > 
 > [TPD gets off soapbox momentarily and notices that all the extraneous
 > line breaks in Joe's URLs were inserted into domain names, not file
 > names.  Well, that's a horse of a different color, but I could still
 > sit around all day finding higher priorities for the gang at Microsoft
 > and Netscape to work on.]
 > 
 > [Quoting Joe Schallan]
 > > ...Carole Leita made the wise suggestion to run all HTML through a
 > > validator.  I hadn't taken the time to do that, of course.  Good
 > > idea.
 > 
 > A strict validator would not have detected the problem, since URLs with
 > white space apparently don't violate the DTD--the HTML spec and the URL
 > spec don't always see eye to eye.  The WebTechs validator, for example,
 > has comments about unquoted font size attributes, an extraneous body
 > element, and a misformatted comment.  In fact, the document also passes
 > the Spyglass validator and the Weblint and Doctor HTML checkers.  The
 > only thing I could find which pointed out the problem was htmlchek, a
 > checker that hasn't been updated in two years and which I had almost
 > deleted as being obsolete.
 > 
 > Just goes to show that there's no substitute for casting an eye over
 > the source code.  
 > 
 > 
 > Thomas Dowling
 > Ohio Library and Information Network
 > tdowling at ohiolink.edu


More information about the Web4lib mailing list