Index: wp-includes/comment-template.php
===================================================================
--- wp-includes/comment-template.php	(Revision 14027)
+++ wp-includes/comment-template.php	(Arbeitskopie)
@@ -1131,19 +1131,30 @@
 }
 
 /**
- * Output hidden input HTML for replying to comments.
+ * Retrieve hidden input HTML for replying to comments.
  *
- * @since 2.7.0
+ * @return string Hidden input HTML for replying to comments
  */
-function comment_id_fields() {
+function get_comment_id_fields() {
 	global $id;
 
 	$replytoid = isset($_GET['replytocom']) ? (int) $_GET['replytocom'] : 0;
-	echo "<input type='hidden' name='comment_post_ID' value='$id' id='comment_post_ID' />\n";
-	echo "<input type='hidden' name='comment_parent' id='comment_parent' value='$replytoid' />\n";
+	$result  = "<input type='hidden' name='comment_post_ID' value='$id' id='comment_post_ID' />\n";
+	$result .= "<input type='hidden' name='comment_parent' id='comment_parent' value='$replytoid' />\n";
+	return $result;
 }
 
 /**
+ * Output hidden input HTML for replying to comments.
+ *
+ * @since 2.7.0
+ * @see get_comment_id_fields() Echoes result
+ */
+function comment_id_fields() {
+	echo get_comment_id_fields();
+}
+
+/**
  * Display text based on comment reply status. Only affects users with Javascript disabled.
  *
  * @since 2.7.0
