cml icon indicating copy to clipboard operation
cml copied to clipboard

handle paths with spaces

Open Autodidact24 opened this issue 2 years ago • 4 comments

Resolving #1369

We can use the encodeURIComponent function to encode any spaces in the node.url property before passing it to the path.resolve function.

This should ensure that image URLs with spaces are resolved correctly and passed to the publish function.

Autodidact24 avatar Apr 09 '23 11:04 Autodidact24

Test Comment

github-actions[bot] avatar Apr 10 '23 15:04 github-actions[bot]

Test Comment

github-actions[bot] avatar Apr 10 '23 15:04 github-actions[bot]

Thanks, @Autodidact24! Can you please add a test case for the changes introduced on this pull request? Sorry for the late reply.

0x2b3bfa0 avatar Jun 03 '23 01:06 0x2b3bfa0

By the way, why does path.resolve need arguments to be URL-encoded? 🤔

0x2b3bfa0 avatar Jun 03 '23 01:06 0x2b3bfa0