-
I tried looking through the discussions and documentation for this: Is it possible to include a blank space when setting a custom variable? So far I have had to work around this by using an underscore instead, but it gets complicated because I am trying to reference files/folders with the variable, so I have to use my macro app to replace the underscore, to and from, each time. I'll laugh if its something simple! I did try using double and single quotes, but it seems to ignore those. Just for clarity sake, this is an example of what I try: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi, you need to URL encode all special characters in the value (and space is considered as a special character here). For this particular use-case, you can just replace space with To be further on the safe side, you can use some online URL encoder. It's good in case your values happen to contain also other special characters than just spaces. This one seems to be a simple and easy to use URL encoder: https://www.urlencoder.io/ . Just write the value into the text field and it will give you the url encoded version of the value immediately. Note that you should only write the value to the encoder - not other parts of the url, because that would break the important
I'll move this discussion to Q & A. 👍 |
Beta Was this translation helpful? Give feedback.
Hi,
you need to URL encode all special characters in the value (and space is considered as a special character here). For this particular use-case, you can just replace space with
%20
, so your url would becomeobsidian://shell-commands/?vault=Vault&_customvariable=Two%20Words
.To be further on the safe side, you can use some online URL encoder. It's good in case your values happen to contain also other special characters than just spaces. This one seems to be a simple and easy to use URL encoder: https://www.urlencoder.io/ . Just write the value into the text field and it will give you the url encoded version of the value immediately. Note that you should only write the value to the encod…