Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #119 from studiopress/add/escape-pattern-previews
Browse files Browse the repository at this point in the history
Escape pattern preview content
  • Loading branch information
mike-day authored Mar 16, 2023
2 parents 9f2bb9e + bed77a2 commit bb047b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wp-modules/editor/editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ function disable_autosave() {
* Receive pattern id in the URL and display its content. Useful for pattern previews and thumbnails.
*/
function display_block_pattern_preview() {
// Nonce not required as the user is not taking any action here.
if ( ! isset( $_GET['pm_pattern_preview'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
return;
}
Expand All @@ -205,7 +206,7 @@ function display_block_pattern_preview() {

wp_head();

echo $the_content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo wp_kses_post( $the_content );

wp_footer();

Expand Down

0 comments on commit bb047b5

Please sign in to comment.