Index: wp-includes/comment-template.php
===================================================================
--- wp-includes/comment-template.php	(revision 14468)
+++ wp-includes/comment-template.php	(working copy)
@@ -1109,14 +1109,20 @@
  * @since 2.7.0
  *
  * @param string $text Optional. Text to display for cancel reply link.
+ * @param string $before The text or HTML to display before the cancel reply link.
+ * @param string $after The text or HTML to display after the cancel reply link.
  */
-function get_cancel_comment_reply_link($text = '') {
+function get_cancel_comment_reply_link($text = '', $before = '', $after = '') {
+	if ( '0' == get_comments_number() || ( !comments_open() && !pings_open() ) || !get_option('thread_comments') || ( get_option('comment_registration') && !is_user_logged_in() ) ) 
+		return false;
+
 	if ( empty($text) )
 		$text = __('Click here to cancel reply.');
 
 	$style = isset($_GET['replytocom']) ? '' : ' style="display:none;"';
 	$link = esc_html( remove_query_arg('replytocom') ) . '#respond';
-	return apply_filters('cancel_comment_reply_link', '<a rel="nofollow" id="cancel-comment-reply-link" href="' . $link . '"' . $style . '>' . $text . '</a>', $link, $text);
+	$return = $before . '<a rel="nofollow" id="cancel-comment-reply-link" href="' . $link . '"' . $style . '>' . $text . '</a>' . $after;
+	return apply_filters('cancel_comment_reply_link', $return);
 }
 
 /**
@@ -1125,9 +1131,11 @@
  * @since 2.7.0
  *
  * @param string $text Optional. Text to display for cancel reply link.
+ * @param string $before The text or HTML to display before the cancel reply link.
+ * @param string $after The text or HTML to display after the cancel reply link.
  */
-function cancel_comment_reply_link($text = '') {
-	echo get_cancel_comment_reply_link($text);
+function cancel_comment_reply_link($text = '', $before = '', $after = '') {
+	echo get_cancel_comment_reply_link($text, $before, $after);
 }
 
 /**
@@ -1491,7 +1499,7 @@
 
 	$commenter = wp_get_current_commenter();
 
-	$req = get_option( 'require_name_email' );
+	$req = get_option( 'require_name_email' );	
 	$aria_req = ( $req ? " aria-required='true'" : '' );
 	$fields =  array(
 		'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) .
@@ -1516,6 +1524,8 @@
 		'title_reply_to'       => __( 'Leave a Reply to %s' ),
 		'cancel_reply_link'    => __( 'Cancel reply' ),
 		'label_submit'         => __( 'Post Comment' ),
+		'cancel_reply_link_before' => '<span>',
+		'cancel_reply_link_after'  => '</span>'
 	);
 
 	$args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) );
@@ -1524,7 +1534,7 @@
 		<?php if ( comments_open() ) : ?>
 			<?php do_action( 'comment_form_before' ); ?>
 			<div id="respond">
-				<h3 id="reply-title"><?php comment_form_title( $args['title_reply'], $args['title_reply_to'] ); ?> <small><?php cancel_comment_reply_link( $args['cancel_reply_link'] ); ?></small></h3>
+				<h3 id="reply-title"><?php comment_form_title( $args['title_reply'], $args['title_reply_to'] ); ?> <?php cancel_comment_reply_link( $args['cancel_reply_link'], $args['cancel_reply_link_before'], $args['cancel_reply_link_after'] ); ?></h3>
 				<?php if ( get_option( 'comment_registration' ) && !is_user_logged_in() ) : ?>
 					<?php echo $args['must_log_in']; ?>
 					<?php do_action( 'comment_form_must_log_in_after' ); ?>
