lib/gsearch-parser.rb in gsearch-parser-0.3.7 vs lib/gsearch-parser.rb in gsearch-parser-0.3.8
- old
+ new
@@ -30,10 +30,12 @@
# Initialize variables
@results = Array.new
case flag
when 'QUERY'
- updateResults("http://google.com/search?q=#{arg1}")
+ # Format query
+ query = arg1.gsub(/ /, '+')
+ updateResults("http://google.com/search?q=#{query}")
when 'URI'
updateResults(arg1)
end
# Update next URI