When attaching a file internally without WikiLinks or externally, percent (%) character is not encoded to %25, breaking link/image display

Steps to reproduce

  1. Open Sandbox Vault
  2. Create dummy image file named Test percent %.png
  3. With WikiLinks enabled (default), drag and drop to some page to attach a copy
  4. With WikiLinks disabled, drag and drop to some page to attach a copy
  5. Ctrl+drag the image to some page to create an external link

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

Step 3 (WikiLinks)

![[Test percent %.png]]

Step 4 (no WikiLinks)

![](Test%20percent%20%25%201.png)

Note the %25

(the 1 is only if you did Step 3 first because then it needs to distinguish the 2nd copy from the 1st copy)

Step 5 (external attachment)

![Test percent %.png](file:///home/leyn/Pictures/temp/Test%20percent%20%25.png)

Note the %25

Actual result

Step 3

![[Test percent %.png]]

This is OK and works as expected.

Step 4

![](Test%20percent%20%%201.png)

There is % after percent%20 instead of %25 and this doesn’t work, showing no image at all.

Step 5

![Test percent %.png](file:///home/leyn/Pictures/temp/Test%20percent%20%.png)

There is % after percent%20 instead of %25 and this doesn’t work, showing no image at all AND there is a JS error popup.

Environment

SYSTEM INFO:
Obsidian version: v1.8.10
Installer version: v1.8.4
Operating system: #148-Ubuntu SMP Fri Mar 14 19:05:48 UTC 2025 5.15.0-138-generic
Login status: not logged in
Language: en
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 0
Plugins enabled: 0

RECOMMENDATIONS:
none


Additional information