From 6866ceae15c92bf43322d7585d9b78a6f28771a6 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 12 Jun 2008 21:38:34 +0000 Subject: [PATCH] Encode < and > in wp_richedit_pre. Props azaozz. fixes #6449 git-svn-id: https://develop.svn.wordpress.org/trunk@8073 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/formatting.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 4bc9460d2a..c49b663d37 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); }