• Resolved pepe

    (@pputzer)


    I use a plugin that (among other things), filters the_title() to add some extra HTML. Since WP Slimstat uses get_the_title() for reports, that extra HTML code shows up in the backend, too. While WP Slimstat escapes the <> characters, a much better solution would be using the_title_attribute() instead.

    Currently, line 1890 in wp-slimstat-reports.php reads as follows:
    $resource_title = get_the_title( $post_id );

    It could be replaced with:
    $resource_title = the_title_attribute( array( 'post' => $post_id, 'echo' => false ) );

    https://ww.wp.xz.cn/plugins/wp-slimstat/

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘HTML code in reports (post titles)’ is closed to new replies.