Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(918)

Unified Diff: chrome/browser/autocomplete/autocomplete_edit.cc

Issue 6982011: Strip leading "javascript:" schemas from text pasted or dropped into the omnibox. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autocomplete/autocomplete_edit.cc
===================================================================
--- chrome/browser/autocomplete/autocomplete_edit.cc (revision 84514)
+++ chrome/browser/autocomplete/autocomplete_edit.cc (working copy)
@@ -413,7 +413,8 @@
profile_->GetAutocompleteClassifier()->Classify(text, string16(), false,
&paste_and_go_match_, &paste_and_go_alternate_nav_url_);
- return paste_and_go_match_.destination_url.is_valid();
+ return paste_and_go_match_.destination_url.is_valid() &&
Peter Kasting 2011/05/10 23:27:42 You shouldn't need this; callers should fix this u
Cris Neckar 2011/05/11 21:42:36 We also want to prevent the Paste And Go menu opti
+ !paste_and_go_match_.destination_url.SchemeIs("javascript");
Avi (use Gerrit) 2011/05/10 23:41:06 constant plz
Cris Neckar 2011/05/11 21:42:36 Done.
}
void AutocompleteEditModel::PasteAndGo() {

Powered by Google App Engine
This is Rietveld 408576698