Support

Account

Home Forums General Issues Text custom field that contain text like control symbols Reply To: Text custom field that contain text like control symbols

  • I came back! 🙂

    Now I’m just one step away to the solution. So… What have we?

    I wrote into the field, for example, “\0”. I pressed “Save post”. And in Debugger, I saw the string $v=”\\0″ in PHPStorm. So, some code makes my string shielded from “\0” to “\\0”. It’s good because without that we will have controls symbol.

    But later in this place:

    [domen]\wp-content\plugins\advanced-custom-fields\core\fields\_functions.php

    on the 181 row the function update_value( $value, $post_id, $field ) un-shielded my string: $value = stripslashes_deep($value);

    Screenshot: http://prntscr.com/ao66r9

    I see comments about “not need” etc, but I don’t understand this very clear. Especially in regard to the possible impact on other fields. And why need we strip slashes?

    Easy solution looks like: //$value = stripslashes_deep($value); But I concern about effect on other fields.

    Please, help me comprehend this all. I think this will be helpful for other people.