• Resolved timjparker

    (@timjparker)


    Html tables inside [um_loggedin] and [/um_loggedin] tags show up as a normal paragraph with no table formatting in version 2.8.7. I have rolled back to 2.8.6 and the table shows correctly. I have done a conflict test and it is not that. Lists show up correctly in 2.8.7. It just seems to be tables that don’t work. Happens in Chrome and Edge. The html code looks right.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support andrewshu

    (@andrewshu)

    Hello @timjparker

    Try to use this hook

    function add_extra_kses_allowed_tags( $allowed_html, $context ) {
    if ( 'templates' === $context ) {
    $allowed_html['table'] = array(
    'width' => true,
    );
    $allowed_html['tr'] = array();
    $allowed_html['td'] = array(
    'colspan' => true,
    'rowspan' => true,
    );
    }
    return $allowed_html;
    }
    add_filter( 'um_late_escaping_allowed_tags', 'add_extra_kses_allowed_tags', 10, 2 );

    Regards.

    Thread Starter timjparker

    (@timjparker)

    Thank you. Which file should I add the hook function to? I tried adding it to includes/um-core-functions.php but that caused a crash.

    Thread Starter timjparker

    (@timjparker)

    I should have said that the error message was “Unexpected token =>”

    Plugin Support andrewshu

    (@andrewshu)

    Hello @timjparker

    functions.php file in your child theme folder.

    Regards.

    Thread Starter timjparker

    (@timjparker)

    Hello @andrewshu

    Works perfectly. Thank you – that has rescued the site. And I now have some new avenues to learn about.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.