Fix escaping of both search term and mediatype

Fix escaping of both search term and mediatype

Prevent things like spaces from causing problems in the UI.

Signed-off-by: Jeff Godin <jgodin@tadl.org>