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+)
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
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 ' isn't translated into ' when importing. > and & actually look fine, contrary to my statements earlier. But it's a bit unclear whether we *should* translate ', since it's an XML entity, and the Netscape bookmarks format is based on HTML. I say we translate it, since ' 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.
Created attachment 196612 [details] test case (from Galeon) Fixed (I deleted some stuff that I shouldn't have; use this one instead)
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
Created attachment 196745 [details] [diff] [review] Fixes our import of ' 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
Comment on attachment 196745 [details] [diff] [review] Fixes our import of ' Mike, can you take a look at this?
fixed trunk & branch.
Comment on attachment 196745 [details] [diff] [review] Fixes our import of ' Clearing review request on fixed bug; apologies for bugspam.