Allow all attributes in $allowedposttags tags

I would like to use $allowedposttags to allow extra HTML tags during entry submission. Can I allow all attributes for a specific tag using $allowedposttags?

For example, the code below will allow iframe tags and the src, height, and width attributes in the iframe tags:

Read More
$allowedposttags['iframe'] = array(
    'src' => array(),
    'height' => array(),
    'width' => array()
);

How can I allow all attributes in this example, not just src, height, and width?

Related posts

Leave a Reply

1 comment

  1. I’m pretty sure you have to explicitly name all allowed attributes – just use:

    $allowedposttags['iframe'] = array (
        'align'       => true,
        'frameborder' => true,
        'height'      => true,
        'width'       => true,
        'sandbox'     => true,
        'seamless'    => true,
        'scrolling'   => true,
        'srcdoc'      => true,
        'src'         => true,
        'class'       => true,
        'id'          => true,
        'style'       => true,
        'border'      => true,
    );
    

    If you can think of others let me know!