mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 02:34:38 +00:00
deprecate wp_specialchars() in favor of esc_html(). Encode quotes for esc_html() as in esc_attr(), to improve plugin security.
git-svn-id: https://develop.svn.wordpress.org/trunk@11380 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -158,7 +158,7 @@ if ( 'private' == $post->post_status ) {
|
||||
$visibility_trans = __('Public');
|
||||
}
|
||||
|
||||
echo wp_specialchars( $visibility_trans ); ?></span>
|
||||
echo esc_html( $visibility_trans ); ?></span>
|
||||
<?php if ( $can_publish ) { ?>
|
||||
<a href="#visibility" class="edit-visibility hide-if-no-js"><?php _e('Edit'); ?></a>
|
||||
|
||||
@@ -397,7 +397,7 @@ require_once('admin-header.php');
|
||||
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<h2><?php echo esc_html( $title ); ?></h2>
|
||||
|
||||
<form name="post" action="page.php" method="post" id="post">
|
||||
<?php if ( $notice ) : ?>
|
||||
@@ -460,7 +460,7 @@ endif; ?>
|
||||
if ($post_ID) {
|
||||
if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) {
|
||||
$last_user = get_userdata($last_id);
|
||||
printf(__('Last edited by %1$s on %2$s at %3$s'), wp_specialchars( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
|
||||
printf(__('Last edited by %1$s on %2$s at %3$s'), esc_html( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
|
||||
} else {
|
||||
printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user