diff --git a/lightbox2_handler_field_lightbox2.inc b/lightbox2_handler_field_lightbox2.inc index c96c00190ae25111853f6f705da17549e9832f0f..c7ee3bec842006d4987a362c623af0dcc362eff7 100755 --- a/lightbox2_handler_field_lightbox2.inc +++ b/lightbox2_handler_field_lightbox2.inc @@ -154,7 +154,12 @@ class lightbox2_handler_field_lightbox2 extends views_handler_field { // div is hidden it won't show up as a lightbox. We also specify a group // in the rel attribute in order to link the whole View together for paging. $group_name = !empty($this->options['custom_group']) ? $this->options['custom_group'] : ($this->options['rel_group'] ? 'lightbox-popup-' . $this->view->name . '-' . implode('/', $this->view->args) : ''); - return "options['width'] : '600px') . ';height:' . ($this->options['height'] ? $this->options['height'] : '600px') . "][" . $caption . "]'>" . $tokens["[{$this->options['trigger_field']}]"] . " + $group_name = check_plain($group_name); + $width = $this->options['width'] ? check_plain($this->options['width']) : '600px'; + $height = $this->options['height'] ? check_plain($this->options['height']) : '600px'; + $trigger_field = filter_xss_admin($this->options['trigger_field']); + + return "" . $tokens["[{$trigger_field}]"] . "
"; } else {