• Resolved Nikita_Sp

    (@nikitasp)


    Hi!

    I’m trying to sanitize content from custom field (using Advanced Custom Fields).
    I’ve found this solution, but it’s not working for me.

    I’ve got:

    • GIF image
    • YouTube iFrame

    Both of them after sanitizing content disappears.
    Here is a code I use in template:

    <?php $amp_content = new AMP_Content(get_sub_field('content'), amp_get_content_embed_handlers( get_post() ), amp_get_content_sanitizers( get_post() ));
    echo $amp_content->get_amp_content(); ?>

    Maybe I’m wrong and there is a simpler way to achieve that?
    Many thanks.

    p.s. still waiting for update on this issue.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Sanitizing custom field content’ is closed to new replies.