| @@ -1,12 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | + | |
| 2 | 3 | namespace WPDeveloper\BetterDocs\Editors\BlockEditor\Blocks; |
| 3 | 4 | |
| 4 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 5 | - exit; | |
| 6 | -} | |
| 7 | - | |
| 8 | - | |
| 9 | 5 | use WPDeveloper\BetterDocs\Editors\BlockEditor\Block; |
| 10 | 6 | |
| 11 | 7 | class FAQ extends Block { |
| 12 | 8 | protected $editor_scripts = [ |
| @@ -79,11 +75,8 @@ | ||
| 79 | 75 | } |
| 80 | 76 | |
| 81 | 77 | public function view_params() { |
| 82 | 78 | $attributes = &$this->attributes; |
| 83 | - | |
| 84 | - // Sanitize the layout attribute to prevent path traversal (LFI). | |
| 85 | - $attributes['faqLayout'] = sanitize_file_name( $attributes['faqLayout'] ); | |
| 86 | 79 | $exclude = $this->get_groups_ids( $attributes['excludeFaqGroup'] ); |
| 87 | 80 | $include = $this->get_groups_ids( $attributes['includeFaqGroup'] ); |
| 88 | 81 | |
| 89 | 82 | $terms_query = betterdocs()->query->faq_terms_query_args( $include, $exclude ); |