From d7e8fb6b252d8360f12185718247849a00ffc385 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sat, 10 Dec 2005 19:03:22 +0000 Subject: [PATCH] Add richedit_pre filter. Props mani_monaj. fixes #2047 git-svn-id: https://develop.svn.wordpress.org/trunk@3284 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions-formatting.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions-formatting.php b/wp-includes/functions-formatting.php index c135b295a3..255b6ccc23 100644 --- a/wp-includes/functions-formatting.php +++ b/wp-includes/functions-formatting.php @@ -995,7 +995,7 @@ function ent2ncr($text) { function wp_richedit_pre($text) { // Filtering a blank results in an annoying
\n - if ( empty($text) ) return '

'; + if ( empty($text) ) return apply_filters('richedit_pre', ''); $output = $text; $output = convert_chars($output); @@ -1005,7 +1005,7 @@ function wp_richedit_pre($text) { $output = str_replace('<', '&lt;', $output); $output = str_replace('>', '&gt;', $output); - return $output; + return apply_filters('richedit_pre', $output); } ?>