Closed Bug 1777140 Opened 3 years ago Closed 3 years ago

Creating .URL files using drag and drop broken when page title contains colon symbol

Categories

(Firefox :: Untriaged, defect)

Firefox 102
Unspecified
Windows
defect

Tracking

()

RESOLVED DUPLICATE of bug 1774683

People

(Reporter: megamurmulis, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0

Steps to reproduce:

OS: Windows 7, Browser: Firefox 102

  1. Open a page that contains a colon ":" symbol:
    https://codelab.ga/d/test_title.html
  2. Drag from address bar to desktop to create an .URL file.

Actual results:

a) FF created an invalid 0 byte file: "title before colon"
(no .URL extension and missing 2nd part of the title = filename got cropped at ":")

b) When space precedes colon - FF fails to create file at all..

c) While most other symbols are correctly replaced - some result in invalid filename error / or even crash explorer process..

Expected results:

FF should have sanitized filename and create a valid .URL file with title:
"title before colon text after colon.URL"

If testing results in a file that cannot be deleted normally in explorer/cmd - delete using Long UNC path in terminal should work:
DEL /A /F "\\?\FULL_PATH\filename"

OS: Unspecified → Windows
Summary: Drag and drop broken when title contains colon → Creating .URL files using drag and drop broken when page title contains colon symbol
  • Firefox 101.0.1 = ok
  • Firefox 102.0 = broken
  • Also not affected by UAC / browser.launcherProcess.enabled state / OS arch..

https://github.com/rust-lang/rust
<title>GitHub - rust-lang/rust: Empowering everyone to build reliable and efficient software.</title>
This actually ends up creating a directory 1st - and .URL file inside it (Note the / slash handling):

GitHub - rust-lang\
    rust Empowering everyone to build reliable and efficient software..URL

strangely ":" gets correctly stripped..

Until this is fixed - can use this workaround in console /bookmarklet:
document.title=document.title.replace(':', ' ').replace('/', ' ');

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.