Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to escape html?


  • eigodeasobo
    Participant

    @eigodeasobo

    Hi bbpress

    I want to escape html in topic and reply output, but I want to Embede media.

    REPLACED this code which you can find inside[bbpress/templates/default/bbpress/content-single-topic-lead.php] file, opening via the editor.
    <?php bbp_topic_content(); ?>
    WITH THIS CODE

    <?php
    global $wp_embed;
    $inputTxt = bbp_get_topic_content();
    $escTxt = esc_html( $inputTxt );
    echo '<div class="test">'.$wp_embed->run_shortcode( '[embed]' . $escTxt . '[/embed]' ).'</div>';
    ?>

    But I can not it.

    How do I write it?

  • You must be logged in to reply to this topic.
Skip to toolbar