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

Issue 598787 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Android: New tab page always shows punycode instead of Unicode as a fallback display title.

Project Member Reported by js...@chromium.org, Mar 29 2016

Issue description


chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java has the following:


    static String getTitleForDisplay(String title, String url) {
        if (TextUtils.isEmpty(title) && url != null) {
            Uri uri = Uri.parse(url);
            String host = uri.getHost();
            String path = uri.getPath();
            if (host == null) host = "";
            if (TextUtils.isEmpty(path) || path.equals("/")) path = "";
            title = host + path;
        }
        return title;


If |url| passed to the function has punycode-ecnode domain names, it'll be shown without being converted to Unicode. On other platforms, IDNToUnicode() is used to convert punycode/ACE IDN to Unicode IDN. 

This will only happen when a page missing <title> or non-HTML page is visited often and is featured in NTP AND has an IDN. The chance is very low. So, the priority is set to 3.


 

Comment 1 by n...@chromium.org, Mar 29 2016

Cc: treib@chromium.org
The solution here should probably be to move the fallback logic for getting a title into C++ (i.e. inside most_visited_bridge.cc), so we can call IDNToUnicode() on the URL if needed.

Comment 2 by n...@chromium.org, Mar 29 2016

Cc: -treib@chromium.org
Owner: treib@chromium.org
Status: Assigned (was: Untriaged)
Marc: could you look at this when you have some time?

Comment 3 by treib@chromium.org, Mar 30 2016

Cc: jkrcal@chromium.org
Components: UI>Browser>NewTabPage
Sure. Not sure how soon that will be though.
+jkrcal: If you're bored, feel free to pick this up.

Comment 4 by treib@chromium.org, Mar 3 2017

Cc: bauerb@chromium.org dgn@chromium.org mvanouwe...@chromium.org treib@chromium.org peconn@chromium.org
Labels: zine-ntp-pe
Owner: ----
Status: Available (was: Assigned)
Labels: zine-client-v1
Project Member

Comment 6 by sheriffbot@chromium.org, Apr 13 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 7 by treib@chromium.org, Apr 18 2018

Cc: -treib@chromium.org
Labels: -Hotlist-Recharge-Cold android-fe-triaged
Status: Available (was: Untriaged)
Updating the bug: The code as of comment writing lies in src/chrome/android/java/src/org/chromium/chrome/browser/ntp/TitleUtil.java
link here: https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/ntp/TitleUtil.java

Sign in to add a comment