Prevent accidental body class concatenation by replacing (no-)customize-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
This commit is contained in:
Jon Cave 2012-10-07 14:58:12 +00:00
parent 8961dc5d91
commit 1191d63830
1 changed files with 1 additions and 1 deletions

View File

@ -1686,7 +1686,7 @@ function wp_customize_support_script() {
request = true; request = true;
<?php endif; ?> <?php endif; ?>
b[c] = b[c].replace( rcs, '' ); b[c] = b[c].replace( rcs, ' ' );
b[c] += ( window.postMessage && request ? ' ' : ' no-' ) + cs; b[c] += ( window.postMessage && request ? ' ' : ' no-' ) + cs;
}()); }());
</script> </script>