diff --git a/includes/media.browser.inc b/includes/media.browser.inc
index 1ac3c81..5f1577b 100644
--- a/includes/media.browser.inc
+++ b/includes/media.browser.inc
@@ -12,7 +12,7 @@ function media_browser($selected = NULL) {
   $output = array();
   $output['#attached']['library'][] = array('media', 'media_browser_page');
 
-  $params = media_set_browser_params();
+  $params = media_get_browser_params();
 
   // If one or more files have been selected, the browser interaction is now
   // complete. Return empty page content to the dialog which now needs to close,
diff --git a/media.media.inc b/media.media.inc
index 4a20dee..ab7b032 100644
--- a/media.media.inc
+++ b/media.media.inc
@@ -50,10 +50,9 @@ function media_query_media_browser_alter($query) {
   }
   $alias = $tables['file_managed']['alias'];
 
-  $params = drupal_get_query_parameters();
   // How do we validate these?  I don't know.
   // I think PDO should protect them, but I'm not 100% certain.
-  array_walk_recursive($params, 'media_recursive_check_plain');
+  $params = media_get_browser_params();
 
   $types = !empty($params['types']) ? $params['types'] : NULL;
   $url_include_patterns = !empty($params['url_include_patterns']) ? $params['url_include_patterns'] : NULL;
