Closed Bug 103466 Opened 23 years ago Closed 23 years ago

Mozilla-generated .url files use unix-style EOL (\n) (internet shortcut)

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, defect)

x86
Windows NT
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: dolmen, Assigned: bugzilla)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

83 bytes, application/octet-stream
Details
I'm a fan of "Drag 'n drop" of URLs from my browser to directories on my HD. I
discovered this feature on IE, and found that it now works with Mozilla. However
end-of-line is incorrect in Mozilla generated Internet shortcuts.

To reproduce :
- display on your desktop both Mozilla and a Windows Explorer window
- open any web page in Mozilla
- drag the bookmark icon just at the left of the URL in Mozilla, to a directory
in the Explorer window.
- you now have a .URL file that has the same name as the title of the web page.

The problem :
the end-of-line character is \n instead of \r\n as in .url files generated by
Internet Explorer

Only tested on Windows NT.


Note that it isn't probably a Windows only bug : I'm not aware of aplications on
other platforms that create or read .url files other than IE. So Internet
shorcuts files MUST always have \r\n EOL. That way we'll be able to create .url
files from Mozilla on a Linux workstation, and reuse them on a Windows PC.
Attached file Exemple file
See also Bug #103468 (another bug related to Mozilla-generated Internet Shortcuts)
-> bookmarks
Assignee: asa → ben
Component: Browser-General → Bookmarks
QA Contact: doronr → claudius
Summary: .url Internet Shortcut with wrong EOL → Mozilla-generated .url files use unix-style EOL (\n) (internet shortcut)
Blocks: 94465
-> XP Apps: Drag and Drop

NEW?
Assignee: ben → blakeross
Component: Bookmarks → XP Apps: Drag and Drop
QA Contact: claudius → tpreston
The problem is here:

http://lxr.mozilla.org/mozilla/source/widget/src/windows/nsDataObj.cpp#528

- static const char* shortcutFormatStr = "[InternetShortcut]\nURL=%s\n";

It should be: 

+ static const char* shortcutFormatStr = "[InternetShortcut]\r\nURL=%s\r\n";
Can someone confirm this bug ?
Confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
pink should review this.
sure thing, if that's what IE does. test it out first. r=pink.
Blocks: 104933
ok, tested and checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Blake,

I think the first EOL is still broken. Current situation:

- static const char* shortcutFormatStr = "[InternetShortcut]\nURL=%s\r\n";

It should be this way

+ static const char* shortcutFormatStr = "[InternetShortcut]\r\nURL=%s\r\n";
                                                            ^^
Please reopen
This bug is fixed on Build ID: 2001101603 (Status:VERIFIED?)
Verified as fixed in 0.9.6 (build 2001112009).
But the fix as an impact on bug #103468. Please fix this bug too.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: