ShowOpenDialog doesn't read "+" character in the file names #793

Closed
opened 2026-01-29 16:48:46 +00:00 by claunia · 2 comments
Owner

Originally created by @AvinashSuresh12 on GitHub (May 11, 2022).

Originally assigned to: @GregorBiswanger on GitHub.

Hi,

I'm trying to get the selected file details using the ShowOpenDialog method from ElectronDialogWindow. Able to get the selected file paths properly but the file Names having the "+" character are not getting recognized properly.

Current behavior: If the file name is "ab+cd" then it will be read as "ab ab". It's not recognizing the "+" character.
Expected behavior: It should recognize the "+" character and read it as "ab+ab".

Does anyone have thoughts about this?

Thanks

Originally created by @AvinashSuresh12 on GitHub (May 11, 2022). Originally assigned to: @GregorBiswanger on GitHub. Hi, I'm trying to get the selected file details using the **ShowOpenDialog** method from **ElectronDialogWindow**. Able to get the selected file paths properly but the file Names having the **"+"** character are not getting recognized properly. Current behavior: If the file name is "ab+cd" then it will be read as "ab ab". It's not recognizing the "+" character. Expected behavior: It should recognize the "+" character and read it as "ab+ab". Does anyone have thoughts about this? Thanks
claunia added the bug label 2026-01-29 16:48:46 +00:00
Author
Owner

@Bmooij commented on GitHub (Jul 28, 2022):

I think this a bug in Electron.NET.

The showOpenDialog command is send to the ElectronNET.Host.
ElectronNET.Host calles the showOpenDialog
And sends the results back to ElectronNET.API.

The ElectronNET.API transforms the paths with an HttpUtility.UrlDecode, but the paths are not UrlEncoded.

When HttpUtility.UrlDecode is called on ab+bc the result is ab bc.
But when HttpUtility.UrlDecode is called on ab-bc the result is ab-bc, therefor it was never noticed before. I think.

@GregorBiswanger could you please confirm this? I can then create a merge request for it.

@Bmooij commented on GitHub (Jul 28, 2022): I think this a bug in [Electron.NET](https://github.com/ElectronNET/Electron.NET). The `showOpenDialog` command is send to the ElectronNET.Host. ElectronNET.Host calles the [`showOpenDialog`](https://github.com/ElectronNET/Electron.NET/blob/e9bf39316570655adca9ff8107e6e70d43577514/ElectronNET.Host/api/dialog.ts#L30) And sends the results back to ElectronNET.API. The ElectronNET.API transforms the paths with an [`HttpUtility.UrlDecode`](https://github.com/ElectronNET/Electron.NET/blob/e9bf39316570655adca9ff8107e6e70d43577514/ElectronNET.API/Dialog.cs#L64), but the paths are **not** UrlEncoded. When `HttpUtility.UrlDecode` is called on `ab+bc` the result is `ab bc`. But when `HttpUtility.UrlDecode` is called on `ab-bc` the result is `ab-bc`, therefor it was never noticed before. I think. @GregorBiswanger could you please confirm this? I can then create a merge request for it.
Author
Owner

@FlorianRappl commented on GitHub (Nov 2, 2025):

Outdated - use ElectronNET.Core and ElectronNET.Core.AspNet.

See Wiki / What's New.

@FlorianRappl commented on GitHub (Nov 2, 2025): Outdated - use `ElectronNET.Core` and `ElectronNET.Core.AspNet`. See [Wiki / What's New](https://github.com/ElectronNET/Electron.NET/wiki/What's-New).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#793