Fixed bug when using German Umlaute or spaces: added encodeURIComponent(query)