htmlspecialchars when loading content into html editor. Props DD32 and andy. fixes #5796

git-svn-id: http://svn.automattic.com/wordpress/trunk@6767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2008-02-09 07:29:36 +00:00
parent 9587194fb9
commit a96ae481ff
2 changed files with 9 additions and 0 deletions

View File

@@ -1111,6 +1111,13 @@ function wp_richedit_pre($text) {
return apply_filters('richedit_pre', $output);
}
function wp_htmledit_pre($output) {
if ( !empty($output) )
$output = htmlspecialchars($output, ENT_NOQUOTES); // convert only < > &
return apply_filters('htmledit_pre', $output);
}
function clean_url( $url, $protocols = null, $context = 'display' ) {
$original_url = $url;