Encode the query string for registy search

@sidharthamani