If the title contains HTML tag, the TOC does not display properly

[ad_1]

Plugin Author
WPJoli

(@wpjoli)

Hi,

Thank you for reporting this. It is actually a small bug and I can only ask you to wait for a few days until I bring a fix to this.

In the meantime, you can actually use one of our built-in filters if you need fixed now. Paste this in your theme’s functions.php and remove it after the next update because it will become unnecessary.

add_filter('joli_toc_headings', 'filter_headings', 10, 2);
// Escape HTML for headings
function filter_headings($headings)
{
    if (version_compare(JTOC()::VERSION, '2.0.5', '<=')) {
        $headings = array_map(function ($heading) {

            $heading['title'] = esc_html($heading['title']);

            return $heading;
        }, $headings);
    }
    return $headings;
}

Let me know if this works.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer