Skip to content

Commit

Permalink
encode the URI for searched match
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Połtyn committed Aug 26, 2011
1 parent 23d1977 commit 8ceb093
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ server = require('node-router').getServer()
im = require('imagemagick')

function fetch(query,cb){
var google = 'http://ajax.googleapis.com/ajax/services/search/images?v=1.0&rsz=8&q=' + query
var google = 'http://ajax.googleapis.com/ajax/services/search/images?v=1.0&rsz=8&q=' + encodeURI(query)
req({uri:google}, function (e, resp, body) {
result = JSON.parse(body)['responseData']['results'][0];

Expand Down

0 comments on commit 8ceb093

Please sign in to comment.