Closed Bug 261474 Opened 20 years ago Closed 16 years ago

Netscape bookmark file containing javascript can't be imported.


(Camino Graveyard :: Bookmarks, defect)

Not set


(Not tracked)



(Reporter: sugar.waffle, Assigned: stuart.morgan+bugzilla)





(1 file)

When Bookmarklet of URL is Import, following bookmark is not import normally.

  -- <DT><A HREF="javascript:var bsetPartialSource = ...
  -- <DT><A HREF="javascript:var bsetLinkTag = ...

In Windows branch/trunk Firefox, it has Imported satisfactory.

Mac OS X 10.3.5
2004092500 (v0.8+)
Reporter could you please provide some more information. What application
created the hml bookmark file?

I tested and I get a dialog informing me that the file is not supported by the
Camino importer. Note that any how I get a Imported folder in the Boomark
manager. I believe that this is incorrect behaviour.
Ever confirmed: true
Summary: A part of Bookmarklet cannot import normally → Netscape bookmark file containing javascript can't be imported.
Target Milestone: --- → Camino1.0
(In reply to comment #1)
> Reporter could you please provide some more information. What application
> created the hml bookmark file?

Probably this Bookmarklet is created by the manual.
So,since this Bookmarklet is not what I created, I do not understand about a
more detailed thing...
Assignee: pinkerton → sfraser_bugs
I just tried this again and didn't get a warning dialogue.  In fact, the entire file imported except for one bookmark: リンクタグ作成 (the second bookmark after the first menu spacer, aka the bsetLinkTag item in comment 0).

The previous bookmark (選択部分のソース aka bsetPartialSource) had <> and then リンクタグ作成 appended to its tile when imported (since リンクタグ作成 wasn't imported at all).
Is it possible we're crapping out after bsetPartialSource because that bookmarklet is so friggin' long?

Also, we're deliberately ignoring character sets in bookmark files. Does/should this matter?

I'm going to try this myself with the patch for bug 309008 applied and see if that makes any difference.

When I import this file with the latest nightly, here's what happens:

1) I get an empty folder, titled "Imported Bookmarks".
2) I get a second folder, titled "べんりセット", containing one bookmark. This bookmark is titled "ID/NAME を表示" and contains the bsetShowIDandNAME Javascript function in its location field.

I get the same results as in comment 5 when I import with the patch for bug 309008 applied, so I don't think that has any bearing on this either way.

Why are our results so different?  I got all but one bookmark with 2005102704 (v1.0a1+) and Chris got only one bookmark, the first one, with the same(?) build.  I used the "Select a file..." option. 

(According to Jesse Ruderman, bookmarks can have at least 20,000 characters:
Netscape?... If this gets fixed before 1.0, that's great. But it's not going to block it, so I'm taking it off the list.
Target Milestone: Camino1.0 → Camino1.1
Pushing out until someone can figure out what's going wrong here and why Chris and I get such different results.

(I wonder if some bit of OS code is used in the parsing and it changed between 10.3 and 10.4???)
Per Mano, this is probably the Netscape Bookmarks File Format, which is used by FF and Mozilla as well.

If that's true, this should get fixed for 1.0. Retargeting back to 1.0.
Target Milestone: Camino1.1 → Camino1.0
-> 1.1
Target Milestone: Camino1.0 → Camino1.1
Depends on: 336269
Assignee: sfraser_bugs → nobody
QA Contact: bookmarks
Target Milestone: Camino1.1 → Camino1.2
Attached file testcase
This is simply the testcase from the URL field so we don't lose it.
The parser is a nightmare; I wouldn't be at all surprised if the use of '<' and '>' in the JS is (probably among other things) what's killing us. I don't see us rewriting it for 1.6 (although it would be worth someone looking into whether we could just use a core or system HTML parser for this, rather than trying to keep maintaining the parser).
Target Milestone: Camino1.6 → ---
This is fixed by my new parser in bug 439024.
Assignee: nobody → stuart.morgan+bugzilla
Depends on: 439024
No longer depends on: 336269
Target Milestone: --- → Camino2.0
Fixed by bug 439024.
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.