Index: src/wp-includes/taxonomy.php
===================================================================
--- src/wp-includes/taxonomy.php	(revision 30029)
+++ src/wp-includes/taxonomy.php	(working copy)
@@ -4107,17 +4107,19 @@
  * post without specifying the Post ID. You can also use it outside the Loop to
  * display the taxonomies for a specific post.
  *
- * The available defaults are:
- * 'post' : default is 0. The post ID to get taxonomies of.
- * 'before' : default is empty string. Display before taxonomies list.
- * 'sep' : default is empty string. Separate every taxonomy with value in this.
- * 'after' : default is empty string. Display this after the taxonomies list.
- * 'template' : The template to use for displaying the taxonomy terms.
- *
  * @since 2.5.0
- * @uses get_the_taxonomies()
+ * @see get_the_taxonomies() for detail about the $template and $term_template arguments.
  *
- * @param array $args Override the defaults.
+ * @param array $args {
+ *     Arguments about which post to use and how to format the output.
+ *
+ *     @type  int|WP_Post $post          Post ID or object to get taxonomies of. Default current post.
+ *     @type  string      $before        Displays before the taxonomies. Default empty string.
+ *     @type  string      $sep           Separates each taxonomy. Default is a space.
+ *     @type  string      $after         Displays after the taxonomies. Default empty string.
+ *     @type  string      $template      Template for a taxonomy label and its terms.
+ *     @type  string      $term_template Template for a term.
+ * }
  */
 function the_taxonomies( $args = array() ) {
 	$defaults = array(
@@ -4125,8 +4127,9 @@
 		'before' => '',
 		'sep' => ' ',
 		'after' => '',
-		/* translators: %s: taxonomy label, %l: list of term links */
-		'template' => __( '%s: %l.' )
+		/* translators: %s: taxonomy label, %l: list of terms formatted as $term_template */
+		'template' => __( '%s: %l.' ),
+		'term_template' => '<a href="%1$s">%2$s</a>',
 	);
 
 	$r = wp_parse_args( $args, $defaults );
@@ -4143,15 +4146,23 @@
  * @since 2.5.0
  *
  * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
- * @param array $args Override the defaults.
+ * @param array $args {
+ *     Arguments about how to format the taxonomy name and its terms.
+ *
+ *     @type  string      $template      Template for displaying a taxonomy label and list of
+ *                                       terms. Default is "Label: Terms."
+ *     @type  string      $term_template Template for displaying a single term in the list.
+ *                                       Default is the term name linked to its archive.
+ * }
  * @return array List of taxonomies.
  */
 function get_the_taxonomies( $post = 0, $args = array() ) {
 	$post = get_post( $post );
 
 	$args = wp_parse_args( $args, array(
-		/* translators: %s: taxonomy label, %l: list of term links */
+		/* translators: %s: taxonomy label, %l: list of terms formatted as $term_template */
 		'template' => __( '%s: %l.' ),
+		'term_template' => '<a href="%1$s">%2$s</a>',
 	) );
 
 	$taxonomies = array();
@@ -4171,6 +4182,9 @@
 		if ( empty( $t['template'] ) ) {
 			$t['template'] = $args['template'];
 		}
+		if ( empty( $t['term_template'] ) ) {
+			$t['term_template'] = $args['term_template'];
+		}
 
 		$terms = get_object_term_cache( $post->ID, $taxonomy );
 		if ( false === $terms ) {
@@ -4179,7 +4193,7 @@
 		$links = array();
 
 		foreach ( $terms as $term ) {
-			$links[] = "<a href='" . esc_attr( get_term_link( $term ) ) . "'>$term->name</a>";
+			$links[] = wp_sprintf( $t['term_template'], esc_attr( get_term_link($term) ), $term->name );
 		}
 		if ( $links ) {
 			$taxonomies[$taxonomy] = wp_sprintf( $t['template'], $t['label'], $links, $terms );
Index: tests/phpunit/tests/taxonomy.php
===================================================================
--- tests/phpunit/tests/taxonomy.php	(revision 30029)
+++ tests/phpunit/tests/taxonomy.php	(working copy)
@@ -49,6 +49,17 @@
 		$this->assertEquals( array( 'category', 'post_tag' ), array_keys( $taxes ) );
 	}
 
+	function test_get_the_taxonomies_term_template() {
+		$post_id = $this->factory->post->create();
+
+		$taxes = get_the_taxonomies( $post_id, array( 'term_template' => '%2$s' ) );
+		$this->assertEquals( 'Categories: Uncategorized.', $taxes['category'] );
+
+		$taxes = get_the_taxonomies( $post_id, array( 'term_template' => '<span class="foo"><a href="%1$s">%2$s</a></span>' ) );
+		$link = get_category_link( 1 );
+		$this->assertEquals( 'Categories: <span class="foo"><a href="' . $link . '">Uncategorized</a></span>.', $taxes['category'] );
+	}
+
 	function test_the_taxonomies() {
 		$post_id = $this->factory->post->create();
 
@@ -57,10 +68,21 @@
 		$output = ob_get_clean();
 
 		$link = get_category_link( 1 );
-		$expected = "Categories: <a href='$link'>Uncategorized</a>.";
+		$expected = 'Categories: <a href="' . $link . '">Uncategorized</a>.';
 		$this->assertEquals( $expected, $output );
 	}
 
+	function test_the_taxonomies_term_template() {
+		$post_id = $this->factory->post->create();
+
+		$output = get_echo( 'the_taxonomies', array( array( 'post' => $post_id, 'term_template' => '%2$s' ) ) );
+		$this->assertEquals( 'Categories: Uncategorized.', $output );
+
+		$output = get_echo( 'the_taxonomies', array( array( 'post' => $post_id, 'term_template' => '<span class="foo"><a href="%1$s">%2$s</a></span>' ) ) );
+		$link = get_category_link( 1 );
+		$this->assertEquals( 'Categories: <span class="foo"><a href="' . $link . '">Uncategorized</a></span>.', $output );
+	}
+
 	function test_get_link_taxonomy() {
 		foreach ( get_object_taxonomies('link') as $taxonomy ) {
 			$tax = get_taxonomy($taxonomy);
