Index: wordpress/wp-includes/formatting.php
===================================================================
--- wordpress/wp-includes/formatting.php	(revision 22313)
+++ wordpress/wp-includes/formatting.php	(working copy)
@@ -1342,8 +1342,13 @@
  * @return string String with backslashes inserted.
  */
 function backslashit($string) {
-	$string = preg_replace('/^([0-9])/', '\\\\\\\\\1', $string);
-	$string = preg_replace('/([a-z])/i', '\\\\\1', $string);
+	// string literals are chosen instead of 0x30..0x39 as value selected
+	// from string is more likely to be string, than integer, thus casted
+	// PHP form shall take place
+	if ( isset( $string[0] ) && $string[0] >= '0' && $string[0] <= '9' ) {
+		$string = '\\\\' . $string;
+	}
+	$string = addcslashes( $string, 'A..Za..z' );
 	return $string;
 }
 
