Permalink
Browse files

Prevent accidental body class concatenation by replacing (no-)customi…

…ze-support with a space

The regular expression used by wp_customize_support_script() replaces all spaces
surrounding the matching class. This caused other classes to be merged together.

Props johnpbloch, SergeyBiryukov. Fixes #22103.


git-svn-id: http://core.svn.wordpress.org/trunk@22132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
joncave committed Oct 7, 2012
1 parent 8961dc5 commit 1191d6383049fb23e54a716312b8bb93698a9970
Showing with 1 addition and 1 deletion.
  1. +1 −1 wp-includes/theme.php
View
@@ -1686,7 +1686,7 @@ function wp_customize_support_script() {
request = true;
<?php endif; ?>
- b[c] = b[c].replace( rcs, '' );
+ b[c] = b[c].replace( rcs, ' ' );
b[c] += ( window.postMessage && request ? ' ' : ' no-' ) + cs;
}());
</script>

0 comments on commit 1191d63

Please sign in to comment.