Index: src/wp-includes/shortcodes.php
===================================================================
--- src/wp-includes/shortcodes.php	(revision 45779)
+++ src/wp-includes/shortcodes.php	(working copy)
@@ -489,7 +489,7 @@
  *
  * @since 2.5.0
  *
- * @param string $text
+ * @param string $text  Any single shortcode of any format or key/value pair string
  * @return array|string List of attribute values.
  *                      Returns empty array if trim( $text ) == '""'.
  *                      Returns empty string if trim( $text ) == ''.
@@ -498,7 +498,15 @@
 function shortcode_parse_atts( $text ) {
 	$atts    = array();
 	$pattern = get_shortcode_atts_regex();
-	$text    = preg_replace( "/[\x{00a0}\x{200b}]+/u", ' ', $text );
+	$text    = trim( preg_replace( "/[\x{00a0}\x{200b}]+/u", ' ', $text ) );
+
+	// Remove everything but attributes from shortcode
+	if ( preg_match( '/^\[[\w-]+([^\]]*)\]/', $text, $matches ) ) {
+		if ( count( $matches ) === 2 ) {
+			$text = trim( $matches[1], ' \/' );
+		}
+	}
+
 	if ( preg_match_all( $pattern, $text, $match, PREG_SET_ORDER ) ) {
 		foreach ( $match as $m ) {
 			if ( ! empty( $m[1] ) ) {
@@ -527,6 +535,7 @@
 	} else {
 		$atts = ltrim( $text );
 	}
+
 	return $atts;
 }
 
Index: tests/phpunit/tests/shortcode.php
===================================================================
--- tests/phpunit/tests/shortcode.php	(revision 45779)
+++ tests/phpunit/tests/shortcode.php	(working copy)
@@ -972,4 +972,86 @@
 		);
 		$this->assertEquals( 'test-shortcode-tag', $this->tagname );
 	}
+
+	public function data_shortcode_parse_atts() {
+
+		return array(
+			array(
+				'[unittest]',
+				'',
+			),
+			array(
+				'[unitest]Unit Test[/unittest]',
+				'',
+			),
+			array(
+				'[unittest title="unittest" link="https://unit.test/"]',
+				array(
+					'title' => 'unittest',
+					'link'  => 'https://unit.test/',
+				),
+			),
+			array(
+				'[unittest title="unittest" link="https://unit.test/"/]',
+				array(
+					'title' => 'unittest',
+					'link'  => 'https://unit.test/',
+				),
+			),
+			array(
+				'[unit_test title="unittest" link="https://unit.test/"/]',
+				array(
+					'title' => 'unittest',
+					'link'  => 'https://unit.test/',
+				),
+			),
+			array(
+				'[unit-test title="unittest" link="https://unit.test/"/]',
+				array(
+					'title' => 'unittest',
+					'link'  => 'https://unit.test/',
+				),
+			),
+			array(
+			'[unittest title="unittest" link="https://unit.test/"]Unit Test[/unittest]',
+				array(
+					'title' => 'unittest',
+					'link'  => 'https://unit.test/',
+				),
+			),
+			array(
+				'title="unittest" link="https://unit.test/"',
+				array(
+					'title' => 'unittest',
+					'link'  => 'https://unit.test/',
+				),
+			),
+			array(
+				'\'\'',
+				array(),
+			),
+			array(
+				'""',
+				array(),
+			),
+		);
+
+	}
+
+	/**
+	 * @covers ::shortcode_parse_atts
+	 * @dataProvider data_shortcode_parse_atts
+	 *
+	 * @ticket 47863
+	 *
+	 * @param $shortcode
+	 * @param $expects
+	 */
+	public function test_shortcode_parse_atts( $shortcode, $expects ) {
+
+		$atts = shortcode_parse_atts( $shortcode );
+
+		$this->assertSame( $expects, $atts );
+
+	}
 }
