CR / line break still missing

[ad_1]

The issue brought up in “Bugs found: missing CR and wrong replacement of &” still has not been fixed: WP Robots.txt still breaks other plugins adding to the virtual robots.txt, as any trailing newline is being stripped, resulting in an unwanted joining of lines, as shown in the original post.

A fix would be to add a trailing newline in inc/core-functionality.php :

function robtxt_filter_robots( $output, $public ) {
        $content = get_option( 'robtxt_content' );
        if ( $content ) {
                $output = esc_attr( wp_strip_all_tags( $content ) ) . PHP_EOL;
        }

        return $output;
}

It would be most helpful to get this integrated. Thanks for considering.

 

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