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: https://develop.svn.wordpress.org/trunk@22132 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jon Cave 2012-10-07 14:58:12 +00:00
parent 453747f8f8
commit a24f3fcefc

View File

@ -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>