Index: wp-includes/post-template.php
===================================================================
--- wp-includes/post-template.php	(revision 12758)
+++ wp-includes/post-template.php	(working copy)
@@ -371,7 +371,7 @@
 
 	$classes = array();
 
-	if ( 'rtl' == get_bloginfo('text_direction') )
+	if ( 'rtl' == get_bloginfo( 'text_direction' ) )
 		$classes[] = 'rtl';
 
 	if ( is_front_page() )
@@ -393,7 +393,7 @@
 
 	if ( is_single() ) {
 		$wp_query->post = $wp_query->posts[0];
-		setup_postdata($wp_query->post);
+		setup_postdata( $wp_query->post );
 
 		$postID = $wp_query->post->ID;
 		$classes[] = 'single postid-' . $postID;
@@ -402,31 +402,32 @@
 			$mime_type = get_post_mime_type();
 			$mime_prefix = array( 'application/', 'image/', 'text/', 'audio/', 'video/', 'music/' );
 			$classes[] = 'attachmentid-' . $postID;
-			$classes[] = 'attachment-' . str_replace($mime_prefix, '', $mime_type);
+			$classes[] = 'attachment-' . str_replace( $mime_prefix, '', $mime_type );
 		}
 	} elseif ( is_archive() ) {
 		if ( is_author() ) {
 			$author = $wp_query->get_queried_object();
 			$classes[] = 'author';
-			$classes[] = 'author-' . sanitize_html_class($author->user_nicename , $author->ID);
+			$classes[] = 'author-' . sanitize_html_class( $author->user_nicename , $author->ID );
 		} elseif ( is_category() ) {
 			$cat = $wp_query->get_queried_object();
 			$classes[] = 'category';
-			$classes[] = 'category-' . sanitize_html_class($cat->slug, $cat->cat_ID);
+			$classes[] = 'category-' . sanitize_html_class( $cat->slug, $cat->cat_ID );
 		} elseif ( is_tag() ) {
 			$tags = $wp_query->get_queried_object();
 			$classes[] = 'tag';
-			$classes[] = 'tag-' . sanitize_html_class($tags->slug, $tags->term_id);
+			$classes[] = 'tag-' . sanitize_html_class( $tags->slug, $tags->term_id );
 		}
 	} elseif ( is_page() ) {
 		$classes[] = 'page';
 
 		$wp_query->post = $wp_query->posts[0];
-		setup_postdata($wp_query->post);
+		setup_postdata( $wp_query->post );
 
 		$pageID = $wp_query->post->ID;
 
 		$classes[] = 'page-id-' . $pageID;
+		$classes[] = 'page-slug-' . sanitize_html_class( $wp_query->post->post_name, '' );
 
 		if ( $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' LIMIT 1", $pageID) ) )
 			$classes[] = 'page-parent';
@@ -440,7 +441,7 @@
 			$classes[] = 'page-template-' . sanitize_html_class( str_replace( '.', '-', get_post_meta( $pageID, '_wp_page_template', true ) ), '' );
 		}
 	} elseif ( is_search() ) {
-		if ( !empty($wp_query->posts) )
+		if ( !empty( $wp_query->posts ) )
 			$classes[] = 'search-results';
 		else
 			$classes[] = 'search-no-results';
@@ -449,10 +450,10 @@
 	if ( is_user_logged_in() )
 		$classes[] = 'logged-in';
 
-	$page = $wp_query->get('page');
+	$page = $wp_query->get( 'page' );
 
 	if ( !$page || $page < 2)
-		$page = $wp_query->get('paged');
+		$page = $wp_query->get( 'paged' );
 
 	if ( $page && $page > 1 ) {
 		$classes[] = 'paged-' . $page;
@@ -473,15 +474,15 @@
 			$classes[] = 'search-paged-' . $page;
 	}
 
-	if ( !empty($class) ) {
+	if ( !empty( $class ) ) {
 		if ( !is_array( $class ) )
-			$class = preg_split('#\s+#', $class);
-		$classes = array_merge($classes, $class);
+			$class = preg_split( '#\s+#', $class );
+		$classes = array_merge( $classes, $class );
 	}
 
-	$classes = array_map('esc_attr', $classes);
+	$classes = array_map( 'esc_attr', $classes );
 
-	return apply_filters('body_class', $classes, $class);
+	return apply_filters( 'body_class', $classes, $class );
 }
 
 /**
