require 'uri'

class SuperSearch
	def self.url
		"http://search.alaska.dev/"
	end
	def self.query_param_for(item_name)
		# item_name.gsub(/\s+/, '+')
		URI.encode item_name
	end
	def self.url_for(item_name)
		"#{SuperSearch.url}index.php?q=#{SuperSearch.query_param_for(item_name)}"
	end
	def self.url_for_engine(engine_key, item_name)
		SuperSearch.url + engine_key + '/' + SuperSearch.query_param_for(item_name)
	end
end
class SuperSearch
	def self.url
		"http://search.alaska.dev/"
	end
	def self.query_param_for(item_name)
		item_name.gsub(/\s+/, '+')
	end
	def self.url_for(item_name)
		"#{SuperSearch.url}index.php?q=#{SuperSearch.query_param_for(item_name)}"
	end
	def self.url_for_engine(engine_key, item_name)
		SuperSearch.url + engine_key + '/' + SuperSearch.query_param_for(item_name)
	end
end
--- 
+++ 
@@ -1,9 +1,12 @@
+require 'uri'
+
 class SuperSearch
 	def self.url
 		"http://search.alaska.dev/"
 	end
 	def self.query_param_for(item_name)
-		item_name.gsub(/\s+/, '+')
+		# item_name.gsub(/\s+/, '+')
+		URI.encode item_name
 	end
 	def self.url_for(item_name)
 		"#{SuperSearch.url}index.php?q=#{SuperSearch.query_param_for(item_name)}"
Use built in URI library to encode urls for supersearch
