diff --git wp-includes/post-template.php wp-includes/post-template.php
index bf4671b..b02c460 100644
--- wp-includes/post-template.php
+++ wp-includes/post-template.php
@@ -79,9 +79,8 @@ function the_title_attribute( $args = '' ) {
 	$r = wp_parse_args($args, $defaults);
 	extract( $r, EXTR_SKIP );
 
-
-	$title = $before . $title . $after;
 	$title = esc_attr(strip_tags($title));
+	$title = $before . $title . $after;
 
 	if ( $echo )
 		echo $title;
