Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/typoFixer.js

Issue 9302008: Ignore urlbar inputs without any special characters (Closed)
Patch Set: Created Jan. 31, 2013, 2:47 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/typoFixer.js
===================================================================
--- a/lib/typoFixer.js
+++ b/lib/typoFixer.js
@@ -121,6 +121,10 @@
// Spaces before the first slash or period is probably a quick search
if (/^[^\/\.\s]+\s/.test(value))
return null;
+
+ // No special characters is probably a quick search
+ if (!/[^\w ]/.test(value))
+ return null;
let [prefix, domain, suffix] = parseURL(value);
if (!domain)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld