User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0
Steps to reproduce:
- Create a local directory like /tmp/example_dir
- Create a file with a name such as 'foo bar' (lots of spaces), or even one that ends with multiple spaces, such as 'salad dressing '.
- Visit file:///tmp/example_dir in Firefox.
- Notice that the filenames shown are 'foo bar' (spaces collapsed) and 'salad dressing'.
This is purely a visual bug. The engine is correctly collapsing spaces.
Possible CSS solution (just thinking out loud here):
I'm guessing that the problem can be fixed by using 'white-space: pre-wrap;' in 'dirListing.css'.
(Currently 'white-space' isn't being used.)
Thinking about what value to use for 'white-space':
I guess both 'break-spaces' and 'pre-wrap' seem like good candidates.
But, I guess 'pre-wrap' is a better choice than 'break-spaces' because the latter can lead to a filename being able to take up more than 1 line if the filename ends with multiple spaces. (In that case, the filenames takes up 2 lines, but the 2nd line is empty and the 1st line ends with the ellipsis ... characters, so that would look odd with the 2nd line being empty after the ellipsis characters.)
Hence 'pre-wrap' is probably a better choice. When using 'pre-wrap', filenames that end with multiple spaces take up only 1 line, and multiple spaces located elsewhere (not at the end) are displayed correctly.
Multiple (sequential) spaces in filenames are collapsed to single spaces. Thus, filenames like 'foo bar' are shown as 'foo bar'.
The filename should be shown as it really is.