diff --git a/js/lightbox.js b/js/lightbox.js index 69a497452a84c40a06f788abce99cdd6a023876b..701b3e9c8d28feba9a48651de677d317e57f2c7b 100644 --- a/js/lightbox.js +++ b/js/lightbox.js @@ -1155,13 +1155,12 @@ var Lightbox = { return (jQuery.inArray(key, keys) != -1 || jQuery.inArray(String(code), keys) != -1); }, - filterXSS: function(str, allowed_tags) { + filterXSS: function(str) { var output = ""; $.ajax({ url: Drupal.settings.basePath + 'system/lightbox2/filter-xss', data: { - 'string' : str, - 'allowed_tags' : allowed_tags + 'string' : str }, type: "POST", async: false, diff --git a/lightbox2.module b/lightbox2.module index 206020df016e9e4650f51c9fff8b757ca9d6dd90..1be0864209d9aead870d3ab016228a3190d27980 100644 --- a/lightbox2.module +++ b/lightbox2.module @@ -1352,13 +1352,7 @@ function lightbox2_views_api() { function lightbox2_filter_xss() { $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)); - if (!empty($_POST['allowed_tags']) && $_POST['allowed_tags'] != 'undefined') { - $allowed_tags = explode(',', $_POST['allowed_tags']); - $output = filter_xss($_POST['string'], $allowed_tags); - } - else { - $output = filter_xss($_POST['string'], $allowed_tags); - } + $output = filter_xss($_POST['string'], $allowed_tags); drupal_json($output); }