Index: wp-includes/link-template.php
===================================================================
--- wp-includes/link-template.php	(revision 13693)
+++ wp-includes/link-template.php	(working copy)
@@ -2143,19 +2143,22 @@
  * @param string $before Optional HTML to display before the link.
  * @param string $before Optional HTML to display after the link.
  */
-function the_shortlink($text = '', $title = '', $before = '', $after = '') {
+function the_shortlink( $text = '', $title = '', $before = '', $after = '' ) {
 	global $post;
 
-	if ( empty($text) )
+	if ( empty( $text ) )
 		$text = __('This is the short link.');
 
-	if ( empty($title) )
-		$title = the_title_attribute( array('echo' => FALSE) );
+	if ( empty( $title ) )
+		$title = the_title_attribute( array( 'echo' => FALSE ) );
 
-	$shortlink = wp_get_shortlink($post->ID);
+	$shortlink = wp_get_shortlink( $post->ID );
 
-	if ( !empty($shortlink) )
-		echo "$before<a rel='shortlink' href='$shortlink' title='$title'>$text</a>$after";
+	if ( !empty( $shortlink ) ) {
+		$link = '<a rel="shortlink" href="' . esc_attr( $shortlink ) . '" title="' . $title . '">' . $text . '</a>';
+		$link = apply_filters( 'the_shortlink', $link, $shortlink, $text, $title );
+		echo $before, $link, $after;
+	}
 }
 
 ?>
