Pasting into the Address Bar or Find Dialog corrects double-spaces to single spaces
Reported by
aschwa...@gmail.com,
Sep 12 2017
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3213.2 Safari/537.36 Steps to reproduce the problem: 1. Copy the following text to your clipboard: http://xenon.stanford.edu/~aschwa/a. b 2. Paste it into the address bar or find dialog 3. The pasted text is http://xenon.stanford.edu/~aschwa/a. b 4. The web page that is displayed is incorrect. What is the expected behavior? Pasted URL should have been http://xenon.stanford.edu/~aschwa/a. b What went wrong? A space was removed from the URL Did this work before? Yes unsure. I haven't dug in to figure it out. I'm going off of memory. Chrome version: 63.0.3213.2 Channel: canary OS Version: 10.0 Flash Version: Altering pasted URLs is problematic for obvious reasons. But this also causes problems for people who are trying to search for exact text in a web page. For example, try copying the following text to the clipboard: This is the first sentence. This is the second sentence. Then paste that text into the find dialog. The find dialog will show "0/0" (no instances of the text found). This is a bit nonsensical, since you literally just copied that text from this web page.
,
Sep 13 2017
This is a tricky one. Stripping and condensing whitespace is sometimes desirable, especially when there are intervening newlines. For example, text pasted from an email may have indentation at the start of each line that shouldn't be included when pasting into the address bar as a search. For URLs, the space character is supposed to be escaped in paths, and when you navigate to "http://xenon.stanford.edu/~aschwa/a. b" in Chrome, it's converted to "http://xenon.stanford.edu/~aschwa/a.%20%20b". This canonical form is safe to copy and paste. The form with spaces is not, and while Chrome does its best to fix things up, this is playing with fire -- most other applications will treat the whitespace as an end-of-URL marker. So, on just the original testcase, my inclination is WontFix. The find bar does not do URL fixup, and in general it's less obvious how it should handle whitespace. It certainly seems awkward that copying text from a page and pasting it in doesn't find that text. Strawman proposal: * In the find bar, don't strip any whitespace characters from anywhere on paste. * In the omnibox, only remove the following: * Leading and trailing whitespace * Other runs of whitespace that contain line breaks of some sort (convert to single space) Wondering what cases this breaks.
,
Sep 18 2017
Your solutions for both the find bar and the omnibox make sense to me. TBH, I encountered the issue originally with the find bar. I encountered it repeatedly over the course of a few months before I finally figured out what the underlying problem is. I only encountered the issue with the omnibox when trying to figure out how widespread the issue is. So, since the omnibox solution potentially opens up a bigger can of worms, perhaps this issue should be split into two issues, one for the find bar and one for the omnibox.
,
Sep 19 2017
I cannot reproduce the Find-in-page issue on my Mac. It doesn't appear to collapse pasted spaces at all.
,
Oct 25 2017
Find-in-page does not collapse it on Linux M62 through ToT, and furthermore finds 3 occurrences of the string on this page, but the Omnibox does collapse it. Can we narrow down the platform where find doesn't work (or conclude that there's only one bug) ?
,
Oct 25 2017
For find-in-page, I think all we need is sometime to test Windows. If that works, I think this is only an omnibox bug.
,
Oct 25 2017
On Win Dev (M63), my Find in Page box condenses two spaces ("a. b") to one ("a. b").
I find it very strange that Linux would behave differently, though perhaps this is due to some kind of strange clipboard impl difference. krb, did you copy the string with two spaces in it?
,
Oct 25 2017
I just tested Linux. Find-in-page collapses the spaces. (I paste the string from the original report in the box, and it appears with only one space, not two.) Google Chrome 62.0.3202.62 (Official Build) (64-bit) Revision 9da914b118cb0d10d715ccc4ad20575a0305a304-refs/branch-heads/3202@{#700} OS Linux
,
Nov 15 2017
I figured out the difference. When I use ^V, it condenses. When I middle mouse click, it preserves. In the Omnibox, even middle click condenses.
,
Dec 22 2017
I had this problem in Windows today with find in page. foo bar becomes foo bar Tested CTRL+V and Shift+Ins Version 63.0.3239.108 (Official Build) (64-bit)
,
Jan 12 2018
Also see bug 798523, which is about pasting full-width spaces into the address bar and getting normal (half-width) spaces. This apparently can be a problem when pasting (unescaped) URL that has spaces; the omnibox's fix-up code then encodes it in a different way than was intended.
,
Jan 14
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
,
Jan 14
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by keerthan...@techmahindra.com
, Sep 13 2017Components: -UI UI>Browser>Omnibox
Labels: -Type-Bug-Regression Triaged-ET M-63 Needs-Triage-M63 OS-Linux OS-Mac Type-Bug
Status: Untriaged (was: Unconfirmed)