Skip to:
Content
Pages
Categories
Search
Top
Bottom

Allow HTML from users


  • caming
    Participant

    @caming

    What’s the best way to allow users to paste and use HTML? The problem is that there are still issues with the Visual editor, so can anyone help me allow them to use HTML?

    Thanks ~

Viewing 2 replies - 26 through 27 (of 27 total)

  • AmiNimA
    Participant

    @aminima

    I’m using this, and it works fine:

    if ( !function_exists( 'ja_filter_bbpress_allowed_tags' ) ) {
    function ja_filter_bbpress_allowed_tags() {
    return array(
     
    // Links
    'a' => array(
    'href' => array(),
    'title' => array(),
    'rel' => array()
    ),
     
    // Quotes
    'blockquote' => array(
    'cite' => array()
    ),
     
    // Code
    'code' => array(),
    'pre' => array(),
     
    // Formatting
    'em' => array(),
    'strong' => array(),
    'del' => array(
    'datetime' => true,
    ),
    'span' => array(
    'lang' => array(),
    'style' => array()
    ),
    'p' => array(
    'dir' => array(),
    'style' => array()
    ),
    'div' => array(
    'class' => array()
    ),
    // Lists
    'ul' => array(),
    'ol' => array(
    'start' => true,
    ),
    'li' => array(),
     
    // Images
    'img' => array(
    'src' => true,
    'border' => true,
    'alt' => true,
    'height' => true,
    'width' => true,
    )
    );
    }
    }
    add_filter( 'bbp_kses_allowed_tags', 'ja_filter_bbpress_allowed_tags' );

    rendi edwido
    Participant

    @rendi-edwido

    Seen your problem was solved.
    You are so nice to make the guest allow Html code.
    Cheers for you mate

Viewing 2 replies - 26 through 27 (of 27 total)

You must be logged in to reply to this topic.