Home › Forums › ACF PRO › Escaping & in text fields › Reply To: Escaping & in text fields
I think you need to let Elliot know about this https://www.advancedcustomfields.com/contact/
This is the function in both the text and textarea fields that I thing is causing the issue, although I could be wrong
/**
* validate_value
*
* Validates a field's value.
*
* @date 29/1/19
* @since 5.7.11
*
* @param (bool|string) Whether the value is vaid or not.
* @param mixed $value The field value.
* @param array $field The field array.
* @param string $input The HTML input name.
* @return (bool|string)
*/
function validate_value( $valid, $value, $field, $input ){
// Check maxlength
if( $field['maxlength'] && mb_strlen(wp_unslash($value)) > $field['maxlength'] ) {
return sprintf( __('Value must not exceed %d characters', 'acf'), $field['maxlength'] );
}
// Return.
return $valid;
}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.