Add/allow import site gutenberg pr #1610
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for the change, related issues
This is related to supporting visual regression testing of Gutenberg PRs with Playground.
WordPress/gutenberg#62729
Importing content into a Playground makes testing easier. This will allow the supported
import-site
parameter to be used on this page as well.Implementation details
This change adds a check for a the
import-site
query parameter and adds a step to the blueprint when it is found.The link has minimal validation, but I don't believe this creates a significant security concern. In theory someone could corrupt the blueprint by directing people to this URL with a malformed query parameter.
Validating that the parameter is a URL, and not passing the query string or hash seemed to mitigate the most obvious offenses.
Testing Instructions (or ideally a Blueprint)
gutenberg.html
with a query parameterimport-site
pointing to a valid Playground ZIP import.