Index: /wp-includes/nav-menu-template.php
===================================================================
--- /wp-includes/nav-menu-template.php	(revision 17488)
+++ /wp-includes/nav-menu-template.php	(working copy)
@@ -81,13 +81,19 @@
 
 		$output .= $indent . '<li' . $id . $value . $class_names .'>';
 
-		$attributes  = ! empty( $item->attr_title ) ? ' title="'  . esc_attr( $item->attr_title ) .'"' : '';
-		$attributes .= ! empty( $item->target )     ? ' target="' . esc_attr( $item->target     ) .'"' : '';
-		$attributes .= ! empty( $item->xfn )        ? ' rel="'    . esc_attr( $item->xfn        ) .'"' : '';
-		$attributes .= ! empty( $item->url )        ? ' href="'   . esc_attr( $item->url        ) .'"' : '';
+		$atts = array();
+		if( ! empty( $item->attr_title ) )
+			$atts[ 'title' ] = 'title="'  . esc_attr( $item->attr_title ) .'"';
+		if ( ! empty( $item->target ) )
+			$atts[ 'target' ] = 'target="' . esc_attr( $item->target     ) .'"';
+		if ( ! empty( $item->xfn ) )
+			$atts[ 'rel' ] = 'rel="'    . esc_attr( $item->xfn        ) .'"';
+		if ( ! empty( $item->url ) )
+			$atts[ 'href' ] = 'href="'   . esc_attr( $item->url        ) .'"';
+		$attributes = join( ' ', apply_filters( 'nav_menu_a_attributes', $atts, $item, $args ) );
 
 		$item_output = $args->before;
-		$item_output .= '<a'. $attributes .'>';
+		$item_output .= '<a '. $attributes .'>';
 		$item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after;
 		$item_output .= '</a>';
 		$item_output .= $args->after;
