Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Fix legacy Display Logic in Gutenberg block previews - #174

Open
zhildzik wants to merge 1 commit into
masterfrom
fix/rest-display-logic
Open

zhildzik wants to merge 1 commit into
masterfrom
fix/rest-display-logic

Conversation

@zhildzik

@zhildzik zhildzik commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

An administrator could enter a valid condition containing an escaped apostrophe, pass AJAX validation, and still see the block disappear in Gutenberg. The REST renderer removed escaping a second time. It now preserves the decoded expression, and the validator checks the same PHP expression the renderer evaluates.

During REST block previews, only users with manage_options can evaluate legacy inline conditions. The plugin identifies the block renderer from the controller WordPress matched, so mixed-case routes receive the same handling. It also clears inline conditions from non-admin JSON requests when a method override makes the request a GET.

@zhildzik

Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants