Closed Bug 308998 Opened 20 years ago Closed 20 years ago

' not translated when importing from bookmarks.html on disk

Categories

(Camino Graveyard :: Bookmarks, enhancement)

PowerPC
macOS
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Camino1.0

People

(Reporter: mlei2, Assigned: bugzilla-graveyard)

Details

(Keywords: fixed1.8)

Attachments

(2 files, 1 obsolete file)

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.
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.
OK, never mind, I'm an idiot, ' isn't even a valid entity in HTML. Closed INVALID
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
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).
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
Attached file test case (exported from Galeon) (obsolete) —
Fixed (I deleted some stuff that I shouldn't have; use this one instead)
Attachment #196610 - Attachment is obsolete: true
Severity: normal → enhancement
Status: VERIFIED → UNCONFIRMED
Resolution: INVALID → ---
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
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
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
Closed: 20 years ago20 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.

Attachment

General

Creator:
Created:
Updated:
Size: