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: add sanitize_key() to escaping functions #1786

Merged
merged 1 commit into from Aug 1, 2019

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Aug 1, 2019

sanitize_key() only allows for lowercase characters, numbers, underscore and dash characters. So a variable run through sanitize_key() can be considered just as safe, if not more so, than a variable run through one of the escaping functions.

Ref:

igorschoester added a commit to Yoast/wordpress-seo that referenced this pull request Aug 1, 2019
`sanitize_key()` only allows for lowercase characters, numbers, underscore and dash characters. So a variable run through `sanitize_key()` can be considered just as safe, if not more so, than a variable run through one of the escaping functions.

Ref:
* https://developer.wordpress.org/reference/functions/sanitize_key/
@jrfnl jrfnl force-pushed the feature/escapeoutput-allow-sanitizekey branch from 36f1980 to a8ad671 Compare August 1, 2019 15:30
@GaryJones GaryJones merged commit 30aef1d into develop Aug 1, 2019
@GaryJones GaryJones deleted the feature/escapeoutput-allow-sanitizekey branch August 1, 2019 21:33
igorschoester added a commit to Yoast/wordpress-seo that referenced this pull request Aug 2, 2019
igorschoester added a commit to Yoast/wordpress-seo that referenced this pull request Aug 2, 2019
igorschoester added a commit to Yoast/wordpress-seo that referenced this pull request Aug 2, 2019
igorschoester added a commit to Yoast/wordpress-seo that referenced this pull request Sep 23, 2019
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