From 3ddb5cb0662ba0a7dce72f166f94a38dca72c83c Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Tue, 7 May 2013 20:34:58 +0000 Subject: [PATCH] Go back to plain text diffs between revisions instead of attempting partial rendering. fixes #24254 git-svn-id: https://develop.svn.wordpress.org/trunk@24192 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/ajax-actions.php | 2 +- wp-includes/wp-diff.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index 06d47af870..8a7b6a15a2 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -2158,7 +2158,7 @@ function wp_ajax_revisions_data() { $left_content = apply_filters( "_wp_post_revision_field_$field", $left_revision->$field, $field, $left_revision, 'left' ); $right_content = apply_filters( "_wp_post_revision_field_$field", $right_revision->$field, $field, $right_revision, 'right' ); - add_filter( "_wp_post_revision_field_$field", 'wp_kses_post' ); + add_filter( "_wp_post_revision_field_$field", 'htmlspecialchars' ); $args = array(); diff --git a/wp-includes/wp-diff.php b/wp-includes/wp-diff.php index be6187f697..62f4162fa3 100644 --- a/wp-includes/wp-diff.php +++ b/wp-includes/wp-diff.php @@ -154,7 +154,7 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { $r = ''; foreach ($lines as $line) { if ( $encode ) - $line = wp_kses_post( $line ); + $line = htmlspecialchars( $line ); if ( $this->_show_split_view ) { $r .= '' . $this->emptyLine() . $this->emptyLine() . $this->addedLine( $line ) . "\n"; } else { @@ -176,7 +176,7 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { $r = ''; foreach ($lines as $line) { if ( $encode ) - $line = wp_kses_post( $line ); + $line = htmlspecialchars( $line ); if ( $this->_show_split_view ) { $r .= '' . $this->deletedLine( $line ) . $this->emptyLine() . $this->emptyLine() . "\n"; } else { @@ -199,7 +199,7 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { $r = ''; foreach ($lines as $line) { if ( $encode ) - $line = wp_kses_post( $line ); + $line = htmlspecialchars( $line ); if ( $this->_show_split_view ) { $r .= '' . $this->contextLine( $line ) . $this->emptyLine() . $this->contextLine( $line ) . "\n"; } else {