WordPress-Coding-Standards icon indicating copy to clipboard operation
WordPress-Coding-Standards copied to clipboard

Add do_blocks to the $autoEscapedFunctions list

Open dossy opened this issue 9 months ago • 1 comments

Add do_blocks to the $autoEscapedFunctions list.

Closes #2524.

dossy avatar Mar 24 '25 00:03 dossy

The do_blocks() function doesn't produce output, but returns instead, so it doesn't belong in the $autoEscapedFunctions list.

I also don't see the function escaping the output, so as far as I can see, it should also not be considered an escaping function. It's a re-rendering function, not an escaping function.

The exact same things can be said about do_shortcode(), and yet it is in the $autoEscapedFunctions list.

do_blocks() should be added for the exact same reasons do_shortcode() was.

dossy avatar Apr 05 '25 12:04 dossy