From: Anthony Talarico Date: Mon, 23 Nov 2015 21:09:05 +0000 (-0500) Subject: removed regex X-Git-Tag: v1.0.0^2~271 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=fba19143954dfcd80d6a3efa48d871fe3b77804d;p=WP-Themes%2Fstaffords.git removed regex --- diff --git a/search.php b/search.php index 5a7175f..2002624 100644 --- a/search.php +++ b/search.php @@ -37,7 +37,7 @@ // Load content as plain text global $wp_query, $post; - $content = preg_replace('/[\n\r]+/', '', $content); + $content = (!post_password_required($post) ? strip_tags(preg_replace(array("/\r?\n/", '@<\s*(p|br\s*/?)\s*>@'), array(' ', "\n"), apply_filters('the_content', $post->post_content))) : ''); // Search content for terms