diff --git a/lightbox2.module b/lightbox2.module
index 1be0864..5a62eb6 100644
--- a/lightbox2.module
+++ b/lightbox2.module
@@ -1350,9 +1350,14 @@ function lightbox2_views_api() {
 }
 
 function lightbox2_filter_xss() {
+  if (empty($_POST['string'])) {
+    drupal_json('');
+    exit;
+  }
   $allowed_tags = trim(variable_get('lightbox2_filter_xss_allowed_tags', 'p, br, a, em, strong, cite, code, ul, ol, li, dl, dt, dd'));
   $allowed_tags = (empty($allowed_tags) ? array() : preg_split('/[,\s]+/', $allowed_tags));
   $output = filter_xss($_POST['string'], $allowed_tags);
   drupal_json($output);
+  exit;
 }
 
