-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Copy Advanced URI" produces extra %25 characters when copied from Obsidian file menu thingy #62
Comments
I had some cases (e.g. launching from terminal https://vinzent03.github.io/obsidian-advanced-uri/concepts/encoding), where double encoding solved the issue. I'm wondering that double encoding causes invalid urls for you. |
Actually, I do see valid use cases for double encoding but I wanted to confirm with you that this is intentional behavior. Someone on the other forum is arguing that this is somehow not correct behavior and I now am of the belief that there is nothing at all wrong with it, it evaluates correctly to only one result. |
Hi, Maybe you could make double encoding optional, and encode other symbols as well? Maybe add some options to enable/disable double encoding, and/or to override how certain symbols should be encoded? |
@Pachtjuilaard Oh you are right, the vault parameter isn't encoded. How do you open the links that the double encoding causes issues? |
@Vinzent03 What I would like to happen is to just get the URI for a note using the "copy URI for current file" command, paste that in the URL bar of any web browser, and open a note that way. Example: I have a note to some D&D Character Sheet in Obsidian, called Sinker. The "copy URI for current file" gives obsidian://advanced-uri?vault=D&D%20Obsidian&filepath=D%2526D%2520Obsidian%2520Shared%252FCore%252FCampaigns%252FSword%2520Coast%2520Buccaneers%252FCharacters%252FSinker%252FSinker.md Now, I have to paste that into some text editor, find and replace all cases of "%2520" and turn it into "%20", and I have to change the "&" in the vault name to %26. Thanks for looking into it! |
I have no issues opening an uri containing double encoded |
Seems like I didn't test well enough! Only changing the & into %26 resolves the problem for me as well, regardless of browser. |
Then I will publish the vault fix and your issue is solved. |
I have a file in my vault for which the advanced uri is
obsidian://advanced-uri?vault=wealthyvault&filepath=Knowledge%252FArt%252C%2520Spirituality%252C%2520Psychology%252FEmotional%2520Journal.md
The path being encoded is: "Knowledge/Art, Spirituality, Psychology/Emotional Journal|Emotional Journal.md"
As you can see if you look closely, the %25 character is being tossed in there a lot, which evaluates to '%' of course, and this extra level of embedding seems to contradict the documentation about encoding.
I have an open ticket with the developer of Keyboard Maestro and the question has come up about why the URIs are formatted with this extra level of %25 encoding.
So the question is, why are the URI's this way, and is it a mistake or should the documentation be changed?
Thanks!
The text was updated successfully, but these errors were encountered: