sitecrafting / conifer

:evergreen_tree: A powerful WordPress library plugin for OO development
https://www.coniferplug.in
MIT License
18 stars 2 forks source link

Determine default behavior for stripping slashes from form field values #128

Closed acobster closed 3 years ago

acobster commented 4 years ago

Expected behavior

I would expect form fields with string values to be properly unescaped/stripped of slashes when calling $form->get().

For example, if $_POST looks like [ "username" => "Coby'" ], I'd expect $form->get('username') to be the string Coby'.

Actual behavior

Instead, it includes a slash, e.g. Coby\'. We should probably strip slashes by default for strings, but there may be unintended consequences of this.

acobster commented 3 years ago

For reference: https://sitecrafting.atlassian.net/browse/AWBPPE-185

Fix: https://bitbucket.org/sitecrafting/awb-rebound-and-recovery/commits/70a8ae94