From 61420256393400ee612adcfd3e2fe4b9c2775657 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 12 Jun 2008 21:38:34 +0000 Subject: [PATCH] Encode < and > in wp_richedit_pre. Props azaozz. fixes #6449 git-svn-id: http://svn.automattic.com/wordpress/trunk@8073 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/formatting.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 4bc9460d2..c49b663d3 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -1132,6 +1132,10 @@ function wp_richedit_pre($text) { $output = str_replace('<', '&lt;', $output); $output = str_replace('>', '&gt;', $output); + // These should be entities too + $output = str_replace('<', '<', $output); + $output = str_replace('>', '>', $output); + return apply_filters('richedit_pre', $output); }