Skip to content

Escape values to avoid breaking them within single quotes - #95

Merged
schlessera merged 3 commits into
masterfrom
93-escape-config-values
Jan 6, 2022
Merged

Escape values to avoid breaking them within single quotes#95
schlessera merged 3 commits into
masterfrom
93-escape-config-values

Conversation

@schlessera

Copy link
Copy Markdown
Member

As the values provided through the user's arguments are printed within single quotes in the wp-config.php file's defines, we need to escape them properly to avoid breaking these single quoted strings.

This is a stop-gap measure to fix the bug reported in #93, but the proper solution would be to rewrite according to #94 and centralize all validation and escaping in wp-cli/wp-config-transformer.

Fixes #93

@schlessera
schlessera requested a review from a team as a code owner July 16, 2019 16:16
@schlessera schlessera added bug command:config-create Related to 'config create' command labels Jul 16, 2019
@schlessera
schlessera force-pushed the 93-escape-config-values branch 2 times, most recently from 7980bad to 296937c Compare December 24, 2021 01:26
@schlessera
schlessera force-pushed the 93-escape-config-values branch from 296937c to 44abadc Compare January 6, 2022 14:42
@schlessera schlessera added this to the 2.1.2 milestone Jan 6, 2022
@schlessera
schlessera merged commit b26c4fd into master Jan 6, 2022
@schlessera
schlessera deleted the 93-escape-config-values branch January 6, 2022 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug command:config-create Related to 'config create' command

1 participant