 # then strip "map of" from the resulting suggestions.
 class GoogleMaps extends GoogleWithPrefix
   # Example search URL: https://www.google.com/maps?q=%s
-  constructor: -> super "map of", "https?://[a-z]+\.google\.(com|ie|co\.uk|ca|com\.au)/maps"
+  constructor: -> super "map of", "https?://[a-z]+\\.google\\.(com|ie|co\\.uk|ca|com\\.au)/maps"
 
 class Youtube extends GoogleXMLRegexpEngine
   # Example search URL: http://www.youtube.com/results?search_query=%s
   constructor: ->
-    super "^https?://[a-z]+\.youtube\.com/results"
+    super "^https?://[a-z]+\\.youtube\\.com/results"
 
   getUrl: (queryTerms) ->
     Utils.createSearchUrl queryTerms,

class Google extends GoogleXMLRegexpEngine
  # Example search URL: http://www.google.com/search?q=%s
  constructor: (regexps = null) ->
    super regexps ? "^https?://[a-z]+\.google\.(com|ie|co\.uk|ca|com\.au)/"

  getUrl: (queryTerms) ->
    Utils.createSearchUrl queryTerms,


class Bing extends RegexpEngine
  # Example search URL: https://www.bing.com/search?q=%s
  constructor: -> super "^https?://www\\.bing\\.com/search"
  getUrl: (queryTerms) -> Utils.createSearchUrl queryTerms, "http://api.bing.com/osjson.aspx?query=%s"
  parse: (xhr) -> JSON.parse(xhr.responseText)[1]

class Amazon extends RegexpEngine
  # Example search URL: http://www.amazon.com/s/?field-keywords=%s
  constructor: -> super "^https?://www\\.amazon\\.(com|co\\.uk|ca|com\\.au)/s/"
  getUrl: (queryTerms) ->
    Utils.createSearchUrl queryTerms,
      "https://completion.amazon.com/search/complete?method=completion&search-alias=aps&client=amazon-search-ui&mkt=1&q=%s"
