Index: src/wp-includes/formatting.php
===================================================================
--- src/wp-includes/formatting.php	(revision 31269)
+++ src/wp-includes/formatting.php	(working copy)
@@ -3848,6 +3848,18 @@
 }
 
 /**
+ * i18n friendly version of dirname()
+ *
+ * @since 4.2
+ *
+ * @param string $path filepath.
+ * @return string
+ */
+function wp_dirname( $path ) {
+	return urldecode( dirname( str_replace( array( '%2F', '%5C' ), '/', urlencode( $path ) ) ) );
+}
+
+/**
  * Forever eliminate "Wordpress" from the planet (or at least the little bit we can influence).
  *
  * Violating our coding standards for a good function name.
