Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EscapeOutput: allow for typical pattern with _deprecated_file() #1818

Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Oct 24, 2019

The first parameter passed to _deprecated_file() generally is basename( __FILE__ ) based on the code currently in WP Core.
As the result of that function call is safe, I'm proposing making an exception for that particular code pattern when used as the first param in a call to deprecated_file().

Includes unit tests.

Note: the current code does not allow for comments in the first parameter. This would be rare to encounter in these function calls anyway and allowance for it can be added later if needs be.

The first parameter passed to `_deprecated_file()` generally is `basename( __FILE__ )` based on the code currently in WP Core.
As the result of that function call is safe, I'm proposing making an exception for that particular code pattern.

Includes unit tests.

Note: the current code does not allow for comments in the first parameter. This would be rare encounter in these function calls anyway and allowance for it can be added later if needs be.
@dingo-d dingo-d merged commit 3b204a6 into develop Oct 27, 2019
@dingo-d dingo-d deleted the feature/escapeoutput-tolerance-first-param-deprecated-file branch October 27, 2019 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants