From a59daf91cf86f1df4a01c69fb1955aabbf7756e4 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 3 Oct 2013 01:45:39 +0000 Subject: [PATCH] Ensure we globally replace [ and ] in customizer control IDs, to match the PHP. props westonruter. fixes #25238. git-svn-id: https://develop.svn.wordpress.org/trunk@25680 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/customize-controls.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/js/customize-controls.js b/src/wp-admin/js/customize-controls.js index 29d66449c2..7f04e408b9 100644 --- a/src/wp-admin/js/customize-controls.js +++ b/src/wp-admin/js/customize-controls.js @@ -36,7 +36,7 @@ $.extend( this, options || {} ); this.id = id; - this.selector = '#customize-control-' + id.replace( ']', '' ).replace( '[', '-' ); + this.selector = '#customize-control-' + id.replace( /\]/g, '' ).replace( /\[/g, '-' ); this.container = $( this.selector ); settings = $.map( this.params.settings, function( value ) {