Skip to content

CoreBoost v3.1.9

Choose a tag to compare

@github-actions github-actions released this 03 Feb 19:26
· 34 commits to main since this release

馃悰 Fixed - Settings Sanitization

Critical Bug Fixes

  • Fixed 23 settings that could not be disabled or cleared once set.
    • Fixed enable_event_hijacking checkbox - can now be disabled
    • Fixed 22 textarea fields that could not be cleared:
      • Script settings: scripts_to_defer, scripts_to_async, styles_to_defer, exclude_scripts, specific_pages, script_exclusion_patterns
      • Advanced optimization: script_wildcard_patterns, script_regex_patterns, delay_js_exclusions, custom_preconnect_urls
      • Resource removal: unused_css_list, unused_js_list, inline_script_ids, inline_style_ids
      • Critical CSS: critical_css_global, critical_css_home, critical_css_pages, critical_css_posts
      • Tag Manager: tag_head_scripts, tag_body_scripts, tag_footer_scripts

Technical Details

  • Added missing else clauses to all checkbox and textarea sanitization logic
  • Checkbox fields now properly set to false when unchecked
  • Textarea fields now properly cleared to empty string when field is not submitted
  • Added form context awareness to prevent accidental clearing of fields from other tabs
  • Added smart_video_facades to centralized boolean field sanitization

Files Modified

  • includes/admin/class-settings-sanitizer.php - Fixed 13 textarea/CSS fields with context-aware clearing
  • includes/admin/class-script-settings.php - Fixed script_exclusion_patterns
  • includes/admin/class-advanced-optimization-settings.php - Fixed enable_event_hijacking + 4 textarea fields
  • includes/admin/class-tag-settings.php - Fixed 3 tag manager textarea fields

Impact

Users can now properly disable checkboxes and clear textarea fields, eliminating persistent settings that previously couldn't be removed.