Home Forums Feature Requests get_field, the_field() – return escaped value Reply To: get_field, the_field() – return escaped value

  • Hi @jonathan

    I can partially agree. Yes, it’s very easy to implement such a feature on one’s own… but we could say the same about other ACF features. For example about return value option of image field. Why do we need a choice between url and array when we can simply do:
    <?php echo get_field('image')['url']; ?>

    The second reason why such a feature could be implemented is related to what you have said. Less advanced users might not now that fields should be escaped, so for URL field this option could be set to true by default because the most common use case for URL field is to output its value inside a href attribute.