Home Forums Front-end Issues HTML code being converted to entities


HTML code being converted to entities

  • Hi.

    I’ve used ACF for quite a while. I’ve never had this issue before. I am certain I have configured ACF & the code properly.
    I’ll show you screenshots of the admin panel and code.

    Any hints?

    Also, if it matters, this is a multisite.
    Could some other hook be getting in the way somehow?

    Code for outputting:

    // check if the repeater field has rows of data
    if( have_rows('video_entries') ):
    // loop through the rows of data
    while ( have_rows('video_entries') ) : the_row();
    		<h4><?php the_sub_field('video_title'); ?></h4>
    		<div class="video-box"><?php echo get_sub_field('video_embed', false, false); ?></div>
    <?php endwhile; endif; ?>

    Screenshot of ACF config:

  • I discovered that I needed to swap the field formatting to “Convert HTML into tags”. I had originally selected “No formatting” — which I had assumed would result in a straight pass-through of code.

    Did the functionality of these configurations change at some point? I don’t remember ever selecting “Convert HTML into tags” in the past.

  • Hi @incredimike

    I think your right, there was a time when ‘convert to HTML’ was the default, but due to user request this was changed.

    Thanks for posting the answer.


Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘HTML code being converted to entities’ is closed to new replies.