| @@ -41,10 +41,10 @@ | ||
| 41 | 41 | if (!$formId) { |
| 42 | 42 | return '<div class="fluentform-no-form-selected"><p>' . __('Please select a form', 'fluentform') . '</p></div>'; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - $className = sanitize_text_field(Arr::get($atts, 'className', '')); | |
| 46 | - $themeStyle = sanitize_text_field(Arr::get($atts, 'themeStyle', '')); | |
| 45 | + $className = str_replace(['[', ']'], '', sanitize_text_field(Arr::get($atts, 'className', ''))); | |
| 46 | + $themeStyle = str_replace(['[', ']'], '', sanitize_text_field(Arr::get($atts, 'themeStyle', ''))); | |
| 47 | 47 | $type = Helper::isConversionForm($formId) ? 'conversational' : ''; |
| 48 | 48 | |
| 49 | 49 | // Custom CSS for block styling |
| 50 | 50 | |
| @@ -65,9 +65,9 @@ | ||
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | // Return the form with inline styles |
| 69 | - $formOutput = do_shortcode('[fluentform theme="' . $themeStyle . '" css_classes="' . $className . ' ff_guten_block ff_guten_block-' . $formId . '" id="' . $formId . '" type="' . $type . '"]'); | |
| 69 | + $formOutput = do_shortcode('[fluentform theme="' . esc_attr($themeStyle) . '" css_classes="' . esc_attr($className) . ' ff_guten_block ff_guten_block-' . $formId . '" id="' . $formId . '" type="' . $type . '"]'); | |
| 70 | 70 | |
| 71 | 71 | if ($formOutput) { |
| 72 | 72 | $allStyles = ''; |
| 73 | 73 | if ($inlineStyle) { |