PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.15
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.15
6.2.15 6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 All 197 releases
← All changes | app/Services/FormBuilder/Components/DateTime.php +10 -7 6.2.13 → 6.2.15 View file →
@@ -140,16 +140,19 @@
140 140 }
141 141
142 142 public function getCustomConfig($settings, $form = null)
143 143 {
144 - $customConfigObject = fluentform_sanitize_json_object(
145 - (string) ArrayHelper::get($settings, 'date_config')
146 - );
144 + $customConfigObject = trim((string) ArrayHelper::get($settings, 'date_config'));
147 145
148 - // Emitted JS is rebuilt from validated data tokens (ints only) — the raw setting never reaches the script sink.
149 - $customConfigObject = fluentform_date_config_to_js($customConfigObject);
150 -
151 - $customConfigObject = '' !== $customConfigObject ? $customConfigObject : '{}';
146 + if (
147 + !$customConfigObject ||
148 + '{' !== substr($customConfigObject, 0, 1) ||
149 + '}' !== substr($customConfigObject, -1)
150 + ) {
151 + $customConfigObject = '{}';
152 + } else {
153 + $customConfigObject = str_ireplace('</script', '<\\/script', $customConfigObject);
154 + }
152 155
153 156 return apply_filters('fluentform/date_time_custom_config', $customConfigObject, $settings, $form);
154 157 }
155 158