' not translated when importing from bookmarks.html on disk

RESOLVED FIXED in Camino1.0

Status

Camino Graveyard
Bookmarks
--
enhancement
RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: Moses Lei, Assigned: Chris Lawson (gone))

Tracking

({fixed1.8})

unspecified
Camino1.0
PowerPC
Mac OS X
fixed1.8

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b4) Gecko/20050914 Camino/1.0a1
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b4) Gecko/20050914 Camino/1.0a1

When importing from a bookmarks.html on disk, HTML entities are not translated
back to their normal equivalents.

Reproducible: Always

Steps to Reproduce:
1. Export your bookmarks.
2. File->Import Bookmarks->Select a file->exportedbookmarks.html
3. Take a look at the imported bookmarks.

Actual Results:  
HTML entities are not translated back into their normal text equivalents, so
"The Writer's Almanac" is listed as "The Writer's Almanac" and "Court &
Spark" is "Court & Spark"

Expected Results:  
Camino should translate the HTML entities back into their text equivalents.
WFM Camino 2005091704 (v1.0a1+)
(Reporter)

Comment 2

12 years ago
Sorry, made a mistake writing up this bug. Exporting bookmarks from Camino will
*not* work as it doesn't actually write out entities into the exported bookmarks
file, instead keeping the text as is (arguably against HTML standard, if it
matters). That still doesn't mean we shouldn't support translating them back,
though, for those clients that do write out entities (Galeon is one of them that
I know of).

Attaching testcase.
(Reporter)

Comment 3

12 years ago
OK, never mind, I'm an idiot, ' isn't even a valid entity in HTML. Closed
INVALID
Status: UNCONFIRMED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → INVALID
Status: RESOLVED → VERIFIED
(Assignee)

Comment 4

12 years ago
I need to try this out. Reporter, can you post an exported HTML file from
Galeon, or something similar, that includes HTML entities?

I suspect we are indeed *not* doing the right thing here after having looked a
bit at the import code.

cl
When I exported bookmarks from Camino, it looked like the text was exported as
UTF-8 but the < and > of the <Menu Spacer>s were exported as entities (and then
correctly converted back to < and > on import).
(Reporter)

Comment 6

12 years ago
The only thing I see is that &apos; isn't translated into ' when importing. &gt;
and &amp; actually look fine, contrary to my statements earlier. But it's a bit
unclear whether we *should* translate &apos;, since it's an XML entity, and the
Netscape bookmarks format is based on HTML.

I say we translate it, since &apos; is unlikely to appear as a literal, and it
doesn't hurt anyone to translate it, but that would be 1) a little work and 2)
arguably against standard.

Attaching testcase.
Summary: Entities not translated when importing from bookmarks.html on disk → &apos; not translated when importing from bookmarks.html on disk
(Reporter)

Comment 7

12 years ago
Created attachment 196610 [details]
test case (exported from Galeon)
(Reporter)

Comment 8

12 years ago
Created attachment 196612 [details]
test case (from Galeon)

Fixed (I deleted some stuff that I shouldn't have; use this one instead)
Attachment #196610 - Attachment is obsolete: true
(Reporter)

Updated

12 years ago
Severity: normal → enhancement
Status: VERIFIED → UNCONFIRMED
Resolution: INVALID → ---
(Assignee)

Comment 9

12 years ago
Well, that was ridiculously easy to patch. Added one line in NSString+Utils.mm.

I'll hold off uploading the patch until someone (Simon or Mike) gives the final
word on whether or not we even *want* to fix this (see comment 6).

Also, is there anything else like this we should be watching out for?

cl
(Assignee)

Comment 10

12 years ago
Created attachment 196745 [details] [diff] [review]
Fixes our import of &apos;

This'll do it. Anything else we need to add support for can be fixed similarly.
Also fixes a minor style error in the file.

cl
Attachment #196745 - Flags: review?
-> cl
Assignee: pinkerton → bugzilla
(Assignee)

Updated

12 years ago
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment on attachment 196745 [details] [diff] [review]
Fixes our import of &apos;

Mike, can you take a look at this?
Attachment #196745 - Flags: review? → review?(mikepinkerton)
Target Milestone: --- → Camino1.0
fixed trunk & branch.
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago12 years ago
Keywords: fixed1.8
Resolution: --- → FIXED
Comment on attachment 196745 [details] [diff] [review]
Fixes our import of &apos;

Clearing review request on fixed bug; apologies for bugspam.
Attachment #196745 - Flags: review?(mikepinkerton)
You need to log in before you can comment on or make changes to this bug.