Fixed TemplateURL::ReplaceSearchTermsInURL for non-alphanumeric terms.
commitf298455dbafbc7b613047d7909ef60649811ef10
authorvitbar <vitbar@yandex-team.ru>
Tue, 21 Apr 2015 12:58:10 +0000 (21 05:58 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 21 Apr 2015 12:58:25 +0000 (21 12:58 +0000)
tree57f997c601fa6b01894397848eca20f1de3b7410
parentd951db985ae639d4bce8b8ca3934264077636a64
Fixed TemplateURL::ReplaceSearchTermsInURL for non-alphanumeric terms.

Currently the TemplateURL::ReplaceSearchTermsInURL function escapes characters differently than the TemplateURL::HandleReplacements function does, and ignores search engine’s input encoding (which causes incorrect results when the input encoding != "UTF-8"). This patch fixes it up.

R=pkasting@chromium.org

Review URL: https://codereview.chromium.org/1093833002

Cr-Commit-Position: refs/heads/master@{#326017}
components/search_engines/template_url.cc
components/search_engines/template_url_unittest.cc