Child Theme Configurator - Version 1.4.5.1

Version Description

  • Fix: regression bug - sanitizing broke raw input selectors
Download this release

Release Info

Developer lilaeamedia
Plugin Icon 128x128 Child Theme Configurator
Version 1.4.5.1
Comparing to
See all releases

Code changes from version 1.4.5 to 1.4.5.1

child-theme-configurator.php CHANGED
@@ -6,7 +6,7 @@ if ( !defined('ABSPATH')) exit;
6
  Plugin Name: Child Theme Configurator
7
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
8
  Description: Create a Child Theme from any installed Theme. Each CSS selector, rule and value can then be searched, previewed and modified.
9
- Version: 1.4.5
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
@@ -16,7 +16,7 @@ if ( !defined('ABSPATH')) exit;
16
  */
17
 
18
  defined('LF') or define('LF', "\n");
19
- define('CHLD_THM_CFG_VERSION', '1.4.5');
20
  define('CHLD_THM_CFG_MAX_SELECTORS', '5000');
21
  define('CHLD_THM_CFG_MAX_RECURSE_LOOPS', '100');
22
 
6
  Plugin Name: Child Theme Configurator
7
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
8
  Description: Create a Child Theme from any installed Theme. Each CSS selector, rule and value can then be searched, previewed and modified.
9
+ Version: 1.4.5.1
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
16
  */
17
 
18
  defined('LF') or define('LF', "\n");
19
+ define('CHLD_THM_CFG_VERSION', '1.4.5.1');
20
  define('CHLD_THM_CFG_MAX_SELECTORS', '5000');
21
  define('CHLD_THM_CFG_MAX_RECURSE_LOOPS', '100');
22
 
includes/class-ctc-css.php CHANGED
@@ -6,7 +6,7 @@ if ( !defined('ABSPATH')) exit;
6
  Class: Child_Theme_Configurator_CSS
7
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
8
  Description: Handles all CSS output, parsing, normalization
9
- Version: 1.4.5
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
@@ -44,7 +44,7 @@ class Child_Theme_Configurator_CSS {
44
 
45
  function __construct($parent = '') {
46
  // scalars
47
- $this->version = '1.4.5';
48
  $this->querykey = 0;
49
  $this->selkey = 0;
50
  $this->qskey = 0;
@@ -302,7 +302,7 @@ class Child_Theme_Configurator_CSS {
302
  $this->styles = $this->parse_css_input($_POST['ctc_child_imports']);
303
  $this->parse_css('child');
304
  else:
305
- $newselector = isset($_POST['ctc_rewrite_selector']) ? sanitize_text_field($this->parse_css_input($_POST['ctc_rewrite_selector'])) : NULL;
306
  // set the custom sequence value
307
  foreach (preg_grep('#^ctc_ovrd_child_seq_#', array_keys($_POST)) as $post_key):
308
  if (preg_match('#^ctc_ovrd_child_seq_(\d+)$#', $post_key, $matches)):
@@ -318,7 +318,7 @@ class Child_Theme_Configurator_CSS {
318
  if (null == $rule || !isset($this->dict_rule[$rule])) continue;
319
  $ruleid = $this->dict_rule[$rule];
320
  $qsid = $matches[3];
321
- $value = $this->normalize_color($this->parse_css_input($_POST[$post_key]));
322
  $important = $this->is_important($value);
323
  if (!empty($_POST['ctc_' . $valid . '_child_' . $rule . '_i_' . $qsid])) $important = 1;
324
 
@@ -393,7 +393,7 @@ class Child_Theme_Configurator_CSS {
393
  * TODO: this is a stub for future use
394
  */
395
  function parse_css_input($styles) {
396
- return $this->sanitize($styles);
397
  }
398
 
399
  function sanitize($styles) {
@@ -471,7 +471,7 @@ class Child_Theme_Configurator_CSS {
471
  list($rule, $value) = explode(':', $ruleval, 2);
472
  $rule = trim($rule);
473
  $rule = preg_replace_callback("/[^\w\-]/", array($this, 'to_ascii'), $rule);
474
- $value = $this->sanitize($value);
475
 
476
  $rules = $values = array();
477
  // save important flag
@@ -555,7 +555,7 @@ class Child_Theme_Configurator_CSS {
555
  endif;
556
  $important_parnt = empty($valid['i_parnt']) ? 0 : 1;
557
  $important = isset($valid['i_child']) ? $valid['i_child'] : $important_parnt;
558
- $sel_output .= $this->add_vendor_rules($rulearr[$ruleid], $this->sanitize($valarr[$valid['child']]), $shorthand, $important);
559
  endif;
560
  endforeach;
561
  $sel_output .= $this->encode_shorthand($shorthand); // . ($important ? ' !important' : '');
6
  Class: Child_Theme_Configurator_CSS
7
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
8
  Description: Handles all CSS output, parsing, normalization
9
+ Version: 1.4.5.1
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
44
 
45
  function __construct($parent = '') {
46
  // scalars
47
+ $this->version = '1.4.5.1';
48
  $this->querykey = 0;
49
  $this->selkey = 0;
50
  $this->qskey = 0;
302
  $this->styles = $this->parse_css_input($_POST['ctc_child_imports']);
303
  $this->parse_css('child');
304
  else:
305
+ $newselector = isset($_POST['ctc_rewrite_selector']) ? $this->parse_css_input($_POST['ctc_rewrite_selector']) : NULL;
306
  // set the custom sequence value
307
  foreach (preg_grep('#^ctc_ovrd_child_seq_#', array_keys($_POST)) as $post_key):
308
  if (preg_match('#^ctc_ovrd_child_seq_(\d+)$#', $post_key, $matches)):
318
  if (null == $rule || !isset($this->dict_rule[$rule])) continue;
319
  $ruleid = $this->dict_rule[$rule];
320
  $qsid = $matches[3];
321
+ $value = $this->normalize_color($this->sanitize($_POST[$post_key]));
322
  $important = $this->is_important($value);
323
  if (!empty($_POST['ctc_' . $valid . '_child_' . $rule . '_i_' . $qsid])) $important = 1;
324
 
393
  * TODO: this is a stub for future use
394
  */
395
  function parse_css_input($styles) {
396
+ return $this->repl_octal(stripslashes($this->esc_octal($styles)));
397
  }
398
 
399
  function sanitize($styles) {
471
  list($rule, $value) = explode(':', $ruleval, 2);
472
  $rule = trim($rule);
473
  $rule = preg_replace_callback("/[^\w\-]/", array($this, 'to_ascii'), $rule);
474
+ //$value = $this->sanitize($value);
475
 
476
  $rules = $values = array();
477
  // save important flag
555
  endif;
556
  $important_parnt = empty($valid['i_parnt']) ? 0 : 1;
557
  $important = isset($valid['i_child']) ? $valid['i_child'] : $important_parnt;
558
+ $sel_output .= $this->add_vendor_rules($rulearr[$ruleid], $valarr[$valid['child']], $shorthand, $important);
559
  endif;
560
  endforeach;
561
  $sel_output .= $this->encode_shorthand($shorthand); // . ($important ? ' !important' : '');
includes/class-ctc-ui.php CHANGED
@@ -5,7 +5,7 @@ if ( !defined('ABSPATH')) exit;
5
  Class: Child_Theme_Configurator_UI
6
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
7
  Description: Handles the plugin User Interface
8
- Version: 1.4.5
9
  Author: Lilaea Media
10
  Author URI: http://www.lilaeamedia.com/
11
  Text Domain: chld_thm_cfg
5
  Class: Child_Theme_Configurator_UI
6
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
7
  Description: Handles the plugin User Interface
8
+ Version: 1.4.5.1
9
  Author: Lilaea Media
10
  Author URI: http://www.lilaeamedia.com/
11
  Text Domain: chld_thm_cfg
includes/class-ctc.php CHANGED
@@ -6,7 +6,7 @@ if ( !defined('ABSPATH')) exit;
6
  Class: Child_Theme_Configurator
7
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
8
  Description: Main Controller Class
9
- Version: 1.4.5
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
6
  Class: Child_Theme_Configurator
7
  Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
8
  Description: Main Controller Class
9
+ Version: 1.4.5.1
10
  Author: Lilaea Media
11
  Author URI: http://www.lilaeamedia.com/
12
  Text Domain: chld_thm_cfg
js/chld-thm-cfg.js CHANGED
@@ -2,7 +2,7 @@
2
  * Script: chld-thm-cfg.js
3
  * Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
4
  * Description: Handles jQuery, AJAX and other UI
5
- * Version: 1.4.5
6
  * Author: Lilaea Media
7
  * Author URI: http://www.lilaeamedia.com/
8
  * License: GPLv2
2
  * Script: chld-thm-cfg.js
3
  * Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
4
  * Description: Handles jQuery, AJAX and other UI
5
+ * Version: 1.4.5.1
6
  * Author: Lilaea Media
7
  * Author URI: http://www.lilaeamedia.com/
8
  * License: GPLv2
js/chld-thm-cfg.min.js CHANGED
@@ -2,7 +2,7 @@
2
  * Script: chld-thm-cfg.js
3
  * Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
4
  * Description: Handles jQuery, AJAX and other UI
5
- * Version: 1.4.5
6
  * Author: Lilaea Media
7
  * Author URI: http://www.lilaeamedia.com/
8
  * License: GPLv2
2
  * Script: chld-thm-cfg.js
3
  * Plugin URI: http://www.lilaeamedia.com/plugins/child-theme-configurator/
4
  * Description: Handles jQuery, AJAX and other UI
5
+ * Version: 1.4.5.1
6
  * Author: Lilaea Media
7
  * Author URI: http://www.lilaeamedia.com/
8
  * License: GPLv2
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: child theme, custom theme, CSS, responsive design, CSS editor, theme generator
5
  Requires at least: 3.7
6
  Tested up to: 3.9.1
7
- Stable tag: 1.4.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -179,6 +179,9 @@ You can also create a secondary stylesheet that contains @font-face rules and im
179
 
180
  == Changelog ==
181
 
 
 
 
182
  = 1.4.5 =
183
  * Fix: escape quotes in text inputs. This has bugged me for a while now.
184
  * Fix: Escape backslash for octal content values. Thanks Laurent for reporting this.
@@ -291,8 +294,8 @@ You can also create a secondary stylesheet that contains @font-face rules and im
291
 
292
  == Upgrade Notice ==
293
 
294
- = 1.4.5 =
295
- * Fixed a number of issues with text inputs. See changelog for details.
296
 
297
  == Create Your Child Theme ==
298
 
4
  Tags: child theme, custom theme, CSS, responsive design, CSS editor, theme generator
5
  Requires at least: 3.7
6
  Tested up to: 3.9.1
7
+ Stable tag: 1.4.5.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
179
 
180
  == Changelog ==
181
 
182
+ = 1.4.5.1 =
183
+ * Fix: regression bug - sanitizing broke raw input selectors
184
+
185
  = 1.4.5 =
186
  * Fix: escape quotes in text inputs. This has bugged me for a while now.
187
  * Fix: Escape backslash for octal content values. Thanks Laurent for reporting this.
294
 
295
  == Upgrade Notice ==
296
 
297
+ = 1.4.5.1 =
298
+ * Fixed regression bug introduced in 1.4.5 that broke raw css input
299
 
300
  == Create Your Child Theme ==
301