URLs in title bar should be in LTR embedding |
||
Issue descriptionVersion: 54 OS: All What steps will reproduce the problem? (1) Make an empty file site/ا/test.html. (2) cd site (3) Run python -m SimpleHTTPServer. (4) Visit: http://127.0.0.1:8000/%D8%A7/test.html The key here is that you used an IP address, not a domain, and that the path contains an Arabic character U+FE70 ARABIC FATHATAN ISOLATED FORM). This is essentially the same bug as Issue 495933 but in the title, not the Omnibox (so it isn't security). What is the expected output? The tab title shows: 127.0.0.1:8000/ا/test.html What do you see instead? The tab title shows: test.html/ا/127.0.0.1:8000 This is due to the Arabic character causing the entire URL to be rendered in an RTL context (so the domain is shown on the right). We fixed this in the Omnibox in Issue 495933 ; we should fix it elsewhere. RFC 3987 § 4.1 states: "Bidirectional IRIs MUST be rendered in the same way as they would be if they were in a left-to-right embedding; i.e., as if they were preceded by U+202A, LEFT-TO-RIGHT EMBEDDING (LRE), and followed by U+202C, POP DIRECTIONAL FORMATTING (PDF)."; we are not compliant here. Because it is non-editable, we can literally just insert U+202A and U+202C here. There is a function url_formatter::FormatUrl which is responsible for making URLs presentable throughout Chrome. We could add it here, but it might have unintended consequences. A more targeted approach would be to add it in NavigationEntryImpl::GetTitleForDisplay.
,
Aug 1 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c2099b61204ff4d273fdf9fc136bcb02d76093f6 commit c2099b61204ff4d273fdf9fc136bcb02d76093f6 Author: mgiuca <mgiuca@chromium.org> Date: Mon Aug 01 06:50:20 2016 Default page title (the page's URL) is now in an LTR embedding. Only affects URLs with strong right-to-left characters. This fixes the case where the URL contains RTL characters, causing the components of the URL to be rendered from right to left. The display is now consistent with the Omnibox display of URLs and compliant with RFC 3987. BUG= 630481 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2176463002 Cr-Commit-Position: refs/heads/master@{#408920} [modify] https://crrev.com/c2099b61204ff4d273fdf9fc136bcb02d76093f6/content/browser/frame_host/navigation_entry_impl.cc [modify] https://crrev.com/c2099b61204ff4d273fdf9fc136bcb02d76093f6/content/browser/frame_host/navigation_entry_impl_unittest.cc
,
Aug 1 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by mgiuca@chromium.org
, Jul 22 2016