HTML code in reports (post titles)
-
I use a plugin that (among other things), filters
the_title()to add some extra HTML. Since WP Slimstat usesget_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 usingthe_title_attribute()instead.Currently, line 1890 in
wp-slimstat-reports.phpreads 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 ) );
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.