Skip to content
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

WPF DataObject handler mangles URIs #1400

Closed
DevJohnC opened this issue May 17, 2019 · 1 comment · Fixed by #1719
Closed

WPF DataObject handler mangles URIs #1400

DevJohnC opened this issue May 17, 2019 · 1 comment · Fixed by #1719
Milestone

Comments

@DevJohnC
Copy link

DevJohnC commented May 17, 2019

When implementing a Drag+Drop using a DataObject to store URIs the WPF platform (and possibly others) will mangle the URI because it's copied as a string using AbsolutePath (which is an escaped string).

Expected Behavior

For URIs to be copied without extra string escaping.

Actual Behavior

Strings are escaped an additional time when accessing the DataObject's URIs.

Steps to Reproduce the Problem

  1. Start a dragdrop with DoDragDrop using a DataObject that contains a URI with a string that needs escaping, ie: "C:/Windows/Fonts/TreeGridView.Invalidate doesn't work #44 Font.ttf" in my case
  2. Drop on a control with AllowDrop = true and a DragDrop event handler
  3. Inspect the Data property of the DragDropEventArgs and see that "TreeGridView.Invalidate doesn't work #44 Font" has been escaped

Note that when click and dragging from Explorer will not cause this issue because the URI isn't being duplicated via AbsolutePath.

Specifications

  • Version: 2.5.0-ci-10206
  • Platform(s): WPF
  • Operating System(s): Windows 10
@cwensley
Copy link
Member

Hey @DevJohnC,

Should be a relatively easy fix, thanks for submitting the issue!

@cwensley cwensley added this to the 2.x milestone May 17, 2019
@cwensley cwensley modified the milestones: 2.x, 2.5.2 Mar 3, 2020
cwensley added a commit to cwensley/Eto that referenced this issue Jun 12, 2020
Use LocalPath instead for files.
Fixes picoe#1400
@cwensley cwensley modified the milestones: 2.5.x, 2.5.3 Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants