Skip to content

fix(blueprint): allow iframe tags in playground content#13

Merged
firestar300 merged 5 commits intodevelopfrom
fix/blueprint
Apr 20, 2026
Merged

fix(blueprint): allow iframe tags in playground content#13
firestar300 merged 5 commits intodevelopfrom
fix/blueprint

Conversation

@firestar300
Copy link
Copy Markdown
Collaborator

@firestar300 firestar300 commented Apr 20, 2026

Adds a must-use plugin to the blueprint that filters wp_kses_allowed_html to permit iframes. This ensures the demo page content isn't stripped of its iframe elements by WordPress's security filters.


Note

Medium Risk
Touches WordPress sanitization (wp_kses_allowed_html) to allow iframes, which is security-sensitive even though scoped to the Playground demo environment.

Overview
Updates the WordPress Playground blueprint to install a small mu-plugin that relaxes wp_kses_allowed_html for post context by allowing iframe tags/attributes, preventing the demo page’s embedded iframe from being stripped during content insertion.

Reviewed by Cursor Bugbot for commit 78a5d34. Bugbot is set up for automated code reviews on this repo. Configure here.

Adds a must-use plugin to the blueprint that filters `wp_kses_allowed_html` to permit iframes. This ensures the demo page content isn't stripped of its iframe elements by WordPress's security filters.
Renames the must-use plugin file responsible for filtering allowed HTML tags in the Playground environment. While the filename now mentions SVG, the current implementation continues to permit iframe tags to ensure demo content renders correctly.
Comment thread .wordpress-org/blueprints/blueprint.json Outdated
Updates the KSES mu-plugin to permit the 'loading' attribute on iframe tags. This ensures that lazy-loading attributes on iframes are not stripped by WordPress security filters in the Playground environment.
Comment thread .wordpress-org/blueprints/blueprint.json Outdated
Comment thread .wordpress-org/blueprints/blueprint.json Outdated
Replaces the array-based string construction with a nowdoc to improve readability and maintainability. This also cleans up the allowed iframe attributes list, removing a duplicate "id" entry and fixing the string formatting for the "loading" attribute.
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7f8f79c. Configure here.

Comment thread .wordpress-org/blueprints/blueprint.json Outdated
Renames the must-use plugin file from `blockparty-iframe-playground-svg-kses.php` to `blockparty-iframe-playground-kses.php`. This corrects a naming inconsistency as the plugin currently handles iframe permissions rather than SVG tags.
@firestar300 firestar300 merged commit d7fda6b into develop Apr 20, 2026
2 checks passed
@firestar300 firestar300 deleted the fix/blueprint branch April 20, 2026 16:24
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.

1 participant