Skip to content

Conversation

@miguelpeixe
Copy link
Member

@miguelpeixe miguelpeixe commented Nov 26, 2025

All Submissions:

Changes proposed in this Pull Request:

NPPD-989

Modal content from Woo template tags may include markup from hooks. This markup can be script and style tags, which should be allowed.

This PR introduces a content_is_safe flag so the modal content renders without sanitization.

How to test the changes in this Pull Request:

  1. While on trunk, make sure you have My Account v1 enabled
  2. Configure and enable reCAPTCHA (Newspack -> Settings -> Connections)
  3. As a reader, add a new payment method (My Account -> Payment information)
  4. Confirm the reCAPTCHA script tag is sanitized and its contents printed:
image
  1. Checkout this branch, refresh the page, and confirm the script is preserved in the markup

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@miguelpeixe miguelpeixe self-assigned this Nov 26, 2025
@miguelpeixe miguelpeixe requested a review from a team as a code owner November 26, 2025 14:40
@miguelpeixe miguelpeixe added the [Status] Needs Review The issue or pull request needs to be reviewed label Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Status] Needs Review The issue or pull request needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants