I had a cartoon that I wanted to be published.
When I used this URL:
https://citizensandsocieties.org/Community/images/cartoons/when workers unite.jpg
I could see the image in the message I was writing, but when I posted it, it wouldn't show. I would then click on modify, and I would see the image again.
I tried changing the name of the file to
"when_workers_unite.jpg",
thus getting rid of the spaces, and it worked. I could see both the image as I was creating my message and after I posted it.
Spaces really shouldn't be used in web accessible files or folders. You can if you need to though, browsers should understand %20 as a space. For example:
https://citizensandsocieties.org/Community/images/cartoons/when%20workers%20unite.jpg (https://citizensandsocieties.org/Community/images/cartoons/when%20workers%20unite.jpg)
Quote from: Aleksi on April 30, 2022, 07:31:37 AMSpaces really shouldn't be used in web accessible files or folders. You can if you need to though, browsers should understand %20 as a space. For example:
https://citizensandsocieties.org/Community/images/cartoons/when%20workers%20unite.jpg (https://citizensandsocieties.org/Community/images/cartoons/when%20workers%20unite.jpg)
I understand.
This being said, if a newbie, and my participants will be newbies, ;-) sees his image as he is writing it in a post, then it disappears when he publishes it, he won't understand what happened.
From my point of view, either the software does not show an image when there are spaces in a URL when someone is writing a message ior it transforms spaces automatically into %20 when "Preview" or "Post" is clicked .
The software is doing the correct thing, it's not going to be changed, because it's not wrong.
Don't put spaces in the file names of your images in the first place.
Quote from: Arantor on April 30, 2022, 10:53:34 AMThe software is doing the correct thing, it's not going to be changed, because it's not wrong.
Don't put spaces in the file names of your images in the first place.
You are of course entitle to your opinion, and although you are technically right, when you make an analysis on the basis of user-friendliness, the software could be improved.
Issue logged:
https://github.com/SimpleMachines/SMF2.1/issues/7441
Note this works fine in 2.0, but fails in 2.1. Not sure what changed. Worth looking into.
Well, as As per RFC 1738 URLs must not contain literal spaces.
Quote from: Aleksi on April 30, 2022, 11:57:49 AMWell, as As per RFC 1738 URLs must not contain literal spaces.
Most users are not aware of RFC 1738. ;-) Hence, since
it is possible to transform a URL so that spaces are transformed into html code, wouldn't it be a
good usability measure to automatically do this? I think it would, especially since users are able to see the image as they write their message even if the URL has spaces.
I agree it could be useful, if it can be easily achieved.
With SMF 2.1.1, I started getting the issue where URLs with spaces (not with "%20") are rendered as URLs with the spaces deleted. For example, the TestSite link of:
[url="https://testsite.com/Something with a space.html"]TestSite[/url]actually points to: TestSite (https://testsite.com/Something%20with%20a%20space.html) (the URL with spaces deleted)
However,
[url="https://testsite.com/Something%20with%20a%20space.html"]TestSite[/url]works: TestSite (https://testsite.com/Something%20with%20a%20space.html) (the URL with spaces retained)
Is there a way to rewrite all URLs so they have "%20" instead of spaces?
With SMF 2.1.1, pasting rich-text with hyperlinks into the textarea then clicking the "Toggle source view" button strips all the hyperlinks. This didn't happen when I was running SMF 2.1 RC4, either.
"Toggle source view" strips hyperlinks in pasted rich-text #7455 (https://github.com/SimpleMachines/SMF2.1/issues/7455)
Spaces in URLs cause issues #7441 (https://github.com/SimpleMachines/SMF2.1/issues/7441)
There's a Pull Request: Supports URLs with spaces in BBC params #7450 (https://github.com/SimpleMachines/SMF2.1/pull/7450/files).
Fixed in 2.1.3.