Add richedit_pre filter. Props mani_monaj. fixes #2047
git-svn-id: http://svn.automattic.com/wordpress/trunk@3284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
06c51d01c2
commit
0ace9024cd
|
@ -995,7 +995,7 @@ function ent2ncr($text) {
|
||||||
|
|
||||||
function wp_richedit_pre($text) {
|
function wp_richedit_pre($text) {
|
||||||
// Filtering a blank results in an annoying <br />\n
|
// Filtering a blank results in an annoying <br />\n
|
||||||
if ( empty($text) ) return '<p> </p>';
|
if ( empty($text) ) return apply_filters('richedit_pre', '');
|
||||||
|
|
||||||
$output = $text;
|
$output = $text;
|
||||||
$output = convert_chars($output);
|
$output = convert_chars($output);
|
||||||
|
@ -1005,7 +1005,7 @@ function wp_richedit_pre($text) {
|
||||||
$output = str_replace('<', '&lt;', $output);
|
$output = str_replace('<', '&lt;', $output);
|
||||||
$output = str_replace('>', '&gt;', $output);
|
$output = str_replace('>', '&gt;', $output);
|
||||||
|
|
||||||
return $output;
|
return apply_filters('richedit_pre', $output);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue