diff --git a/wp-admin/includes/bookmark.php b/wp-admin/includes/bookmark.php
index 8f36f9f1d..7dd8baf65 100644
--- a/wp-admin/includes/bookmark.php
+++ b/wp-admin/includes/bookmark.php
@@ -246,7 +246,7 @@ function wp_set_link_cats( $link_id = 0, $link_categories = array() ) {
function wp_update_link( $linkdata ) {
$link_id = (int) $linkdata['link_id'];
- $link = get_link( $link_id, ARRAY_A );
+ $link = get_bookmark( $link_id, ARRAY_A );
// Escape data pulled from DB.
$link = add_magic_quotes( $link );
diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php
index fbec48396..32eae4223 100644
--- a/wp-admin/includes/media.php
+++ b/wp-admin/includes/media.php
@@ -1146,7 +1146,7 @@ function get_media_items( $post_id, $errors ) {
function get_media_item( $attachment_id, $args = null ) {
global $redir_tab;
- if ( ( $attachment_id = intval( $attachment_id ) ) && $thumb_url = get_attachment_icon_src( $attachment_id ) )
+ if ( ( $attachment_id = intval( $attachment_id ) ) && $thumb_url = wp_get_attachment_image_src( $attachment_id ) )
$thumb_url = $thumb_url[0];
else
return false;
diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php
index ed9f6f495..787cb4532 100644
--- a/wp-admin/includes/ms.php
+++ b/wp-admin/includes/ms.php
@@ -212,7 +212,7 @@ function wpmu_get_blog_allowedthemes( $blog_id = 0 ) {
if ( is_array( $blog_allowed_themes ) ) {
foreach( (array) $themes as $key => $theme ) {
- $theme_key = wp_specialchars( $theme[ 'Stylesheet' ] );
+ $theme_key = esc_html( $theme[ 'Stylesheet' ] );
if ( isset( $blog_allowed_themes[ $key ] ) == true ) {
$blog_allowedthemes[ $theme_key ] = 1;
}
@@ -335,7 +335,7 @@ function get_site_allowed_themes() {
$allowed_themes = array();
} else {
foreach( (array) $themes as $key => $theme ) {
- $theme_key = wp_specialchars( $theme[ 'Stylesheet' ] );
+ $theme_key = esc_html( $theme[ 'Stylesheet' ] );
if ( isset( $allowed_themes[ $key ] ) == true ) {
$allowedthemes[ $theme_key ] = 1;
}
diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php
index 56a4241b2..de9029d15 100644
--- a/wp-admin/includes/theme.php
+++ b/wp-admin/includes/theme.php
@@ -142,12 +142,12 @@ function get_allowed_themes() {
if ( is_array( $blog_allowed_themes ) )
$allowed_themes = array_merge( $allowed_themes, $blog_allowed_themes );
- if ( isset( $allowed_themes[ wp_specialchars( $ct->stylesheet ) ] ) == false )
- $allowed_themes[ wp_specialchars( $ct->stylesheet ) ] = true;
+ if ( isset( $allowed_themes[ esc_html( $ct->stylesheet ) ] ) == false )
+ $allowed_themes[ esc_html( $ct->stylesheet ) ] = true;
reset( $themes );
foreach ( $themes as $key => $theme ) {
- if ( isset( $allowed_themes[ wp_specialchars( $theme[ 'Stylesheet' ] ) ] ) == false )
+ if ( isset( $allowed_themes[ esc_html( $theme[ 'Stylesheet' ] ) ] ) == false )
unset( $themes[ $key ] );
}
reset( $themes );
diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php
index 731aee6f3..5597bb1a8 100644
--- a/wp-admin/includes/user.php
+++ b/wp-admin/includes/user.php
@@ -92,7 +92,7 @@ function edit_user( $user_id = 0 ) {
if ( empty ( $_POST['url'] ) || $_POST['url'] == 'http://' ) {
$user->user_url = '';
} else {
- $user->user_url = sanitize_url( $_POST['url'] );
+ $user->user_url = esc_url_raw( $_POST['url'] );
$user->user_url = preg_match('/^(https?|ftps?|mailto|news|irc|gopher|nntp|feed|telnet):/is', $user->user_url) ? $user->user_url : 'http://'.$user->user_url;
}
}
diff --git a/wp-admin/ms-edit.php b/wp-admin/ms-edit.php
index 3f413cf23..d435282e7 100644
--- a/wp-admin/ms-edit.php
+++ b/wp-admin/ms-edit.php
@@ -385,8 +385,8 @@ switch ( $_GET['action'] ) {
$themes = get_themes();
reset( $themes );
foreach ( (array) $themes as $key => $theme ) {
- if ( $_POST['theme'][ wp_specialchars( $theme['Stylesheet'] ) ] == 'enabled' )
- $allowed_themes[ wp_specialchars( $theme['Stylesheet'] ) ] = true;
+ if ( $_POST['theme'][ esc_html( $theme['Stylesheet'] ) ] == 'enabled' )
+ $allowed_themes[ esc_html( $theme['Stylesheet'] ) ] = true;
}
update_site_option( 'allowedthemes', $allowed_themes );
}
@@ -413,12 +413,12 @@ switch ( $_GET['action'] ) {
![WordPress](images/wordpress-logo.png)
-
@@ -499,7 +499,7 @@ switch ( $_GET['action'] ) {
wp_die( __('Missing email.') );
$password = wp_generate_password();
- $user_id = wpmu_create_user(wp_specialchars( strtolower( $user['username'] ) ), $password, wp_specialchars( $user['email'] ) );
+ $user_id = wpmu_create_user(wp_specialchars( strtolower( $user['username'] ) ), $password, esc_html( $user['email'] ) );
if ( false == $user_id )
wp_die( __('Duplicated username or email address.') );
diff --git a/wp-admin/ms-options.php b/wp-admin/ms-options.php
index 129c7f0ce..10b19e969 100644
--- a/wp-admin/ms-options.php
+++ b/wp-admin/ms-options.php
@@ -280,7 +280,7 @@ if (isset($_GET['updated'])) {
$menu_perms = get_site_option( 'menu_items' );
$menu_items = apply_filters( 'mu_menu_items', array('plugins' => __('Plugins')) );
foreach ( (array) $menu_items as $key => $val ) {
- echo "" . wp_specialchars($val) . " | |
";
+ echo "" . esc_html($val) . " | |
";
}
?>
diff --git a/wp-admin/ms-sites.php b/wp-admin/ms-sites.php
index 4f0f1bce3..242c53115 100644
--- a/wp-admin/ms-sites.php
+++ b/wp-admin/ms-sites.php
@@ -168,7 +168,7 @@ switch ( $action ) {
$disabled = '';
if ( is_serialized($option->option_value) ) {
if ( is_serialized_string($option->option_value) ) {
- $option->option_value = wp_specialchars(maybe_unserialize($option->option_value), 'single');
+ $option->option_value = esc_html(maybe_unserialize($option->option_value), 'single');
} else {
$option->option_value = "SERIALIZED DATA";
$disabled = ' disabled="disabled"';
@@ -210,7 +210,7 @@ switch ( $action ) {
$allowed_themes = array_keys( $themes );
$out = '';
foreach ( $themes as $key => $theme ) {
- $theme_key = wp_specialchars( $theme['Stylesheet'] );
+ $theme_key = esc_html( $theme['Stylesheet'] );
if ( ! isset($allowed_themes[$theme_key] ) ) {
$checked = ( isset($blog_allowed_themes[ $theme_key ]) ) ? 'checked="checked"' : '';
$out .= '
@@ -253,7 +253,7 @@ switch ( $action ) {
|