-
-
Notifications
You must be signed in to change notification settings - Fork 1
Preserve multiline settings when saving resource hint fields #95
Copy link
Copy link
Closed
Labels
area: admin-uiWordPress admin screens, settings UI, notices, onboarding, or admin bar UX.WordPress admin screens, settings UI, notices, onboarding, or admin bar UX.area: performancePerformance-sensitive behavior, page weight, caching, preloading, or resource hints.Performance-sensitive behavior, page weight, caching, preloading, or resource hints.area: settingsSettings schema, storage contracts, migration, import/export, and validation.Settings schema, storage contracts, migration, import/export, and validation.bugConfirmed or likely defect affecting runtime behavior, UX, compatibility, or data handling.Confirmed or likely defect affecting runtime behavior, UX, compatibility, or data handling.priority: mediumUseful or user-impacting work that should be planned but is not blocking now.Useful or user-impacting work that should be planned but is not blocking now.risk: backward-compatibilityTouches public data, options, hooks, migrations, or established behavior.Touches public data, options, hooks, migrations, or established behavior.status: in-progressWork has a branch, PR, or active release branch implementation path.Work has a branch, PR, or active release branch implementation path.
Milestone
Metadata
Metadata
Assignees
Labels
area: admin-uiWordPress admin screens, settings UI, notices, onboarding, or admin bar UX.WordPress admin screens, settings UI, notices, onboarding, or admin bar UX.area: performancePerformance-sensitive behavior, page weight, caching, preloading, or resource hints.Performance-sensitive behavior, page weight, caching, preloading, or resource hints.area: settingsSettings schema, storage contracts, migration, import/export, and validation.Settings schema, storage contracts, migration, import/export, and validation.bugConfirmed or likely defect affecting runtime behavior, UX, compatibility, or data handling.Confirmed or likely defect affecting runtime behavior, UX, compatibility, or data handling.priority: mediumUseful or user-impacting work that should be planned but is not blocking now.Useful or user-impacting work that should be planned but is not blocking now.risk: backward-compatibilityTouches public data, options, hooks, migrations, or established behavior.Touches public data, options, hooks, migrations, or established behavior.status: in-progressWork has a branch, PR, or active release branch implementation path.Work has a branch, PR, or active release branch implementation path.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Finding
The React settings save flow sends JSON payloads through
perform_save_settings. The server currently cleans the decoded payload recursively before it looks up field definitions, so textarea fields can lose their multiline shape before field-specific sanitization runs.Impact
Resource hint fields such as DNS Prefetch and Preconnect are intended to support one value per line. If newlines are collapsed before the final sanitizer/split step, saved settings can be merged into a single invalid value and the frontend output becomes unreliable.
Suggested implementation
sanitize_textarea_field()for textarea fields before converting newline-separated values into arrays.perform_settingsoption keys and saved value shape compatible.Acceptance criteria