diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index a3a95526d..b587c4bbf 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -241,9 +241,12 @@ function edit_comment() { // Get an existing post and format it for editing. function get_post_to_edit($id) { + global $richedit; + $richedit = ( 'true' == get_user_option('rich_editing') ) ? true : false; + $post = get_post($id); - $post->post_content = format_to_edit($post->post_content); + $post->post_content = format_to_edit($post->post_content, $richedit); $post->post_content = apply_filters('content_edit_pre', $post->post_content); $post->post_excerpt = format_to_edit($post->post_excerpt); @@ -299,9 +302,12 @@ function get_default_post_to_edit() { } function get_comment_to_edit($id) { + global $richedit; + $richedit = ( 'true' == get_user_option('rich_editing') ) ? true : false; + $comment = get_comment($id); - $comment->comment_content = format_to_edit($comment->comment_content); + $comment->comment_content = format_to_edit($comment->comment_content, $richedit); $comment->comment_content = apply_filters('comment_edit_pre', $comment->comment_content); $comment->comment_author = format_to_edit($comment->comment_author); diff --git a/wp-admin/import/blogger.php b/wp-admin/import/blogger.php index e14aa788d..08aa0a255 100644 --- a/wp-admin/import/blogger.php +++ b/wp-admin/import/blogger.php @@ -476,7 +476,7 @@ class Blogger_Import { else if (($comment_date[2] == 'AM') && ($commenthour == '12')) $commenthour = '00'; $comment_date = "$commentyear-$commentmonth-$commentday $commenthour:$commentminute:$commentsecond"; - $comment_author = addslashes(strip_tags(html_entity_decode($commentinfo[1]))); + $comment_author = addslashes(strip_tags($commentinfo[1])); if ( strpos($commentinfo[1], 'a href') ) { $comment_author_parts = explode('"', htmlentities($commentinfo[1])); $comment_author_url = $comment_author_parts[1]; diff --git a/wp-content/themes/default/functions.php b/wp-content/themes/default/functions.php index 90a28466e..2af0b16d3 100644 --- a/wp-content/themes/default/functions.php +++ b/wp-content/themes/default/functions.php @@ -26,14 +26,14 @@ function kubrick_header_image() { function kubrick_upper_color() { if ( strstr( kubrick_header_image_url(), 'header-img.php?' ) ) - return substr( kubrick_header_image(), 24, 6 ); + return substr( kubrick_header_image(), 21, 6 ); else return '69aee7'; } function kubrick_lower_color() { if ( strstr( kubrick_header_image_url(), 'header-img.php?' ) ) - return substr( kubrick_header_image(), 37, 6 ); + return substr( kubrick_header_image(), 34, 6 ); else return '4180b6'; } diff --git a/wp-content/themes/default/images/header-img.php b/wp-content/themes/default/images/header-img.php index a347e2723..afae590b0 100644 --- a/wp-content/themes/default/images/header-img.php +++ b/wp-content/themes/default/images/header-img.php @@ -12,7 +12,7 @@ $vars = array('upper'=>array(0=>'r1', 2=>'g1', 4=>'b1'), 'lower'=>array(0=>'r2', foreach ( $vars as $var => $subvars ) { if ( isset($_GET[$var]) ) { foreach ( $subvars as $index => $subvar ) { - $$subvar = hexdec( substr( html_entity_decode($_GET[$var]), $index, 2) ); + $$subvar = hexdec( substr($_GET[$var], $index, 2) ); if ( $$subvar < 0 || $$subvar > 255 ) $default = true; } @@ -71,4 +71,4 @@ for ( $i = 0; $i < $h; $i++ ) { header("Content-Type: image/jpeg"); imagejpeg($im, '', 92); imagedestroy($im); -?> \ No newline at end of file +?> diff --git a/wp-includes/functions-formatting.php b/wp-includes/functions-formatting.php index 09cbffc17..c135b295a 100644 --- a/wp-includes/functions-formatting.php +++ b/wp-includes/functions-formatting.php @@ -492,9 +492,10 @@ function balanceTags($text, $is_comment = 0) { } -function format_to_edit($content) { +function format_to_edit($content, $richedit = false) { $content = apply_filters('format_to_edit', $content); - $content = htmlspecialchars($content); + if (! $richedit ) + $content = htmlspecialchars($content); return $content; } @@ -997,7 +998,6 @@ function wp_richedit_pre($text) { if ( empty($text) ) return '

'; $output = $text; - $output = html_entity_decode($output); // undoes format_to_edit() $output = convert_chars($output); $output = wpautop($output); diff --git a/wp-includes/js/tinymce/tiny_mce.js b/wp-includes/js/tinymce/tiny_mce.js index 0340c47b0..babc33533 100644 --- a/wp-includes/js/tinymce/tiny_mce.js +++ b/wp-includes/js/tinymce/tiny_mce.js @@ -5307,7 +5307,7 @@ TinyMCEControl.prototype.execCommand = function(command, user_interface, value) // Call custom cleanup code value = tinyMCE.storeAwayURLs(value); - value = tinyMCE._customCleanup(this, "insert_to_editor", value); + //value = tinyMCE._customCleanup(this, "insert_to_editor", value); tinyMCE._setHTML(doc, value); tinyMCE.setInnerHTML(doc.body, tinyMCE._cleanupHTML(this, doc, tinyMCE.settings, doc.body)); this.convertAllRelativeURLs();