Markdown Monster
URL with space
Gravatar is a globally recognized avatar based on your email address. URL with space
  Vincent H.
  All
  May 8, 2020 @ 08:47am

Hi Rick,

URLs containing spaces are not managed.

When inserted, would it be possible to add a %20 automatically ?

Thanks in advance

Gravatar is a globally recognized avatar based on your email address. re: URL with space
  FoxInCloud Support - Thierry N.
  Vincent H.
  May 8, 2020 @ 12:35pm

Hi Vincent,

You can use the URLencode(yourURL) function

Gravatar is a globally recognized avatar based on your email address. re: URL with space
  Vincent H.
  FoxInCloud Support - Thierry N.
  May 8, 2020 @ 11:32pm

Thank you Thierry, I also have a similar function.

But I was speaking in MarkDown, from this screen:

Gravatar is a globally recognized avatar based on your email address. re: URL with space
  Rick Strahl
  Vincent H.
  May 8, 2020 @ 11:45pm

Thinking on this some more...

It might seem simple to just URL Encode the URL you use there, but we can't do that actually in this case because the URL that you might be copying from somewhere most likely is already URL encoded. It should be very, very rare that you type out a URL, but rather pick it up from a browser by using Copy Link or picking up a URL from an Address bar in the browser. In all those cases the URL will already be encoded.

I think other than potentially encoding spaces nothing else can be safely encoded without running the risk of potentially double encoding the URL.

(perhaps, UrlDecode first, then re-encode but even that would cause problems if special characters are used in non-encoded urls (like ampersands and angle brackets and slashes - it's actually quite a tricky problem.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: URL with space
  Vincent H.
  Rick Strahl
  May 9, 2020 @ 02:17am

Thank you Rick, I understand ...
But as a space causes an error, the Paste Link command does not risk anything to replace the spaces with "% 20" right?

Gravatar is a globally recognized avatar based on your email address. re: URL with space
  Rick Strahl
  Vincent H.
  May 9, 2020 @ 01:55pm

Yes, replacing spaces is safe and I've fixed that and it'll be in the next update.

+++ Rick ---

© 1996-2024