New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 862919 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug
Team-Security-UX



Sign in to add a comment

Chrome Settings: Display URLs in a LTR embedding.

Project Member Reported by patricia...@chromium.org, Jul 12

Issue description

According to https://url.spec.whatwg.org/#url-rendering, URLs should always be displayed in a LTR embedding. Update Chrome Settings to do so.
 
Components: UI>Browser>SiteSettings
A patch to make Site Settings do this is in review here: https://crrev.com/c/1113170
Cc: mgiuca@chromium.org
Components: UI>Browser>Passwords
Chrome Settings passwords UI should also do this. See https://cs.chromium.org/chromium/src/chrome/browser/resources/settings/passwords_and_forms_page/password_list_item.html?rcl=d8f6e58c00ce34c51ef65ece6797624672b3701c&l=44 for an example. This code is also using <bdo dir="ltr"> tags, which will result in RTL words inside the tag to be written backwards.

Here is a good example to test with, courtesy of mgiuca@:
 - Consider the string “Website %s is down”, where %s is substituted with a web domain.
 - In Hebrew, this string may be translated as:
    - “Website %s הוא למטה”
 - Now if the website URL is “example.קום”, it is substituted like this:
    - “Website example.קום הוא למטה”
    - Wrong!!! Note that the domain (example.קום) has been split by the surrounding text!
 - You need to add an LTR embedding around the domain, so it renders like this:
    - “Website ‪example.קום‬ הוא למטה”

See https://chromium-review.googlesource.com/c/chromium/src/+/1113170/7/chrome/browser/resources/settings/settings_shared_css.html for a generic way to do this via CSS.
Cc: jdoerrie@chromium.org nepper@chromium.org
See the attached for how "مثال.com" should look in LTR / RTL mode with and without the LTR embedding applied.
Screenshot from 2018-07-13 11-23-22.png
27.6 KB View Download
Project Member

Comment 5 by bugdroid1@chromium.org, Jul 13

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f64108bd1b5cbd2455605363f765173806abc58b

commit f64108bd1b5cbd2455605363f765173806abc58b
Author: Patti <patricialor@chromium.org>
Date: Fri Jul 13 04:16:29 2018

Settings: URLs displayed in Site Settings are now all LTR.

According to the URL spec here - https://url.spec.whatwg.org/#url-rendering,
URLs being displayed in bidirectional text "should be rendered as if it were in
a left-to-right embedding". Update places in Site Settings that display a URL
to conform to this.

See https://bugs.chromium.org/p/chromium/issues/detail?id=862919#c4 for a
screenshot of how this may affect a URL with RTL characters.

Bug: 862919
Cq-Include-Trybots: luci.chromium.try:closure_compilation
Change-Id: Ica8c2bab0f2964c2a03f45f00ea423e2af945f4e
Reviewed-on: https://chromium-review.googlesource.com/1113170
Commit-Queue: Patti <patricialor@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Hector Carmona <hcarmona@chromium.org>
Reviewed-by: Matt Giuca <mgiuca@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574840}
[modify] https://crrev.com/f64108bd1b5cbd2455605363f765173806abc58b/chrome/browser/resources/settings/settings_shared_css.html
[modify] https://crrev.com/f64108bd1b5cbd2455605363f765173806abc58b/chrome/browser/resources/settings/site_settings/protocol_handlers.html
[modify] https://crrev.com/f64108bd1b5cbd2455605363f765173806abc58b/chrome/browser/resources/settings/site_settings/site_data.html
[modify] https://crrev.com/f64108bd1b5cbd2455605363f765173806abc58b/chrome/browser/resources/settings/site_settings/site_entry.html
[modify] https://crrev.com/f64108bd1b5cbd2455605363f765173806abc58b/chrome/browser/resources/settings/site_settings/site_list.html
[modify] https://crrev.com/f64108bd1b5cbd2455605363f765173806abc58b/chrome/browser/resources/settings/site_settings/usb_devices.html
[modify] https://crrev.com/f64108bd1b5cbd2455605363f765173806abc58b/chrome/browser/resources/settings/site_settings/zoom_levels.html
[modify] https://crrev.com/f64108bd1b5cbd2455605363f765173806abc58b/chrome/test/data/webui/settings/protocol_handlers_tests.js

Owner: patricia...@chromium.org
Status: Assigned (was: Available)
patricialor, is this work complete? if so, can you please close the bug? thanks!
Cc: engedy@chromium.org patricia...@chromium.org
Owner: ----
Unfortunately not - the patch in #c5 only did this for Chrome Site Settings, so anywhere else inside settings that displays URLs may not have the correct behavior. I think it may be best for someone from the permissions team or perhaps the settings team to triage?

Sign in to add a comment