hard coded string sanitation removed #361#362
Open
AbmSourav wants to merge 1 commit intoxwp:developfrom
Open
Conversation
kasparsd
reviewed
Jan 25, 2022
kasparsd
left a comment
There was a problem hiding this comment.
Thanks for the pull request! Please see my initial feedback inline.
| */ | ||
| function _foo_bar_php_version_error() { | ||
| printf( '<div class="error"><p>%s</p></div>', esc_html( _foo_bar_php_version_text() ) ); | ||
| printf( '<div class="error"><p>%s</p></div>', _foo_bar_php_version_text() ); |
There was a problem hiding this comment.
Could we keep the esc_html() sanitiser during the output here? Currently it is being removed from all paces.
The best practice would be to sanitize late when we know the type of output we're serving. Technically, the return value of _foo_bar_php_version_text() could be used for things like REST API errors, JS callback errors which would each require a different santiser.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
#361