| Summary: | Safari / IE not representing DBCS links properly | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Ken Walker <ken_walker> |
| Component: | Client | Assignee: | Project Inbox <orion.client-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ahunter.eclipse, harendra, mamacdon, takajo, takepon |
| Version: | 0.4 | ||
| Target Milestone: | 4.0 M2 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | GVT | ||
|
Description
Ken Walker
What's interesting is that I found you can navigate using the Console and open something in an editor in Safari so it's the links being interpreted incorrectly it seems. same behaviors in Safari 6.0.4 on Mac OS X 10.8.3 as of 29th April 2013. URL of DBCS folder is encoded incorrectly. We have tried to address this however have not found a workaround as of yet. It is the only browser that exhibits the behaviour like this at the moment. Will look at it again. Here's the URLs that are actually being requested when you try to open a folder in a new tab (in this case the folder name is "你好"): > Safari - http://localhost:8080/navigate/table.html#/file/mamacdon/%26%2320320%3B%26%2322909%3B/?depth=1 (bad) > Firefox - http://localhost:8080/file/mamacdon/%E4%BD%A0%E5%A5%BD/?depth=1 (ok) Safari seems to barf out a fragment with the DBCS folder name encoded as HTML entities (你好) which are then URLencoded. Other browsers (correctly) use the UTF-8 encoding of the name, and URLencode it byte-by-byte. If we can't trust the browser to encode the fragment properly, we'll have to encode it manually before setting the .href on our links. (In reply to comment #4) > If we can't trust the browser to encode the fragment properly, we'll have to > encode it manually before setting the .href on our links. This is tricky to fix in general, since there's many places where we create links using JavaScript. But the navigator can be fixed by changing only 2 places: extensionCommands line 310: > var uriTemplate = new URITemplate(this.info.uriTemplate); > return window.decodeURIComponent(uriTemplate.expand(variableExpansions)); ^ TBH I'm not sure why it's doing the deocdeURIComponent there at all. navigatorRenderer line 83: > link.href = folderPageURL + "#" + item.ChildrenLocation; //$NON-NLS-0$ I think if we use the result of URITemplate.expand() without mucking around with it, the problem will go away. (In reply to comment #0) > I got Libing to test IE and it seems to have similar problems as Safari. I am not having any problems with a folder and/or filename containing DBCS characters on IE 10.0.9200.16576 on Windows 7. FWIW, here is the proposed change I talked about in Comment 5: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?h=safari_dbcs This appears fixed with the URL work that was done. |