New issue
Advanced search Search tips

Issue 709761 link

Starred by 1 user

Issue metadata

Status: Verified
Owner: ----
Closed: Apr 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

TemplateURL::GenerateKeyword should always convert result keyword to lowercase

Project Member Reported by a-...@yandex-team.ru, Apr 8 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.110 YaBrowser/17.4.0.1854 (beta) Yowser/2.5 Safari/537.36

Steps to reproduce the problem:
TemplateURL::GenerateKeyword returns keyword for search engine URL using GURL::host() method. TemplateURLService component that stores TemplateURLs assumes that keywords are always converted to lowercase.
GURL::host() can return string with uppercase characters for some exotic URLs. For example for "http://embedded.<html>web" it will return  
"embedded.%3Ehtml%3Eweb".
This could lead to problems when TemplateURLService tries to resolve conflicts between autogenerated keywords.

What is the expected behavior?

What went wrong?
Not applicable

Did this work before? N/A 

Chrome version: 57.0.2987.110  Channel: n/a
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 25.0 r0
 

Comment 1 by tapted@chromium.org, Apr 11 2017

Components: UI>Browser>Search
Labels: -OS-Mac OS-All
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 20 2017

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

commit 81695d0da81e63990e210da79b7a65c7dd386140
Author: a-v-y <a-v-y@yandex-team.ru>
Date: Thu Apr 20 08:22:22 2017

Changed GenerateKeyword to always return keyword in lowercase

TemplateURL::GenerateKeyword returns keyword for search engine URL using
GURL::host() method. TemplateURLService component that stores
TemplateURLs assumes that keywords are always converted to lowercase.
GURL::host() can return string with uppercase characters for some exotic
URLs. For example for "http://embedded.<html>web" it will return
"embedded.%3Ehtml%3Eweb".
This could lead to problems when TemplateURLService tries to resolve
conflicts between autogenerated keywords.

BUG= 709761 
R=vasilii@chromium.org, pkasting@chromium.org

Review-Url: https://codereview.chromium.org/2806593006
Cr-Commit-Position: refs/heads/master@{#465946}

[modify] https://crrev.com/81695d0da81e63990e210da79b7a65c7dd386140/chrome/browser/search_engines/template_url_service_unittest.cc
[modify] https://crrev.com/81695d0da81e63990e210da79b7a65c7dd386140/components/search_engines/template_url.cc
[modify] https://crrev.com/81695d0da81e63990e210da79b7a65c7dd386140/components/search_engines/template_url_unittest.cc

Issue fixed and can be closed.
Do you not have editbugs permissions?  Do you want them?
I have no permissions. It would be convenient to have them. 
More permissions == more power :)
Status: Verified (was: Unconfirmed)
Update: Your account should now have EditBugs permissions.
Thanks a lot.

Sign in to add a comment