Version Description
Release Date - 2022-7-13
- IWP-465 Fix issue with sanitizing image/video objects
Download this release
Release Info
Developer | data443 |
Plugin | Tracking Code Manager |
Version | 2.0.11 |
Comparing to | |
See all releases |
Code changes from version 2.0.10 to 2.0.11
- .gitattributes +13 -0
- includes/classes/utils/Options.php +4 -2
- includes/classes/utils/Utils.php +13 -13
- index.php +4 -2
- readme.txt +5 -0
.gitattributes
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Set the default behavior, in case people don't have core.autocrlf set.
|
2 |
+
* text=auto
|
3 |
+
|
4 |
+
# Declare files that will always have LF line endings on checkout.
|
5 |
+
*.php text eol=lf
|
6 |
+
*.txt text eol=lf
|
7 |
+
|
8 |
+
# Declare files that will always have CRLF line endings on checkout.
|
9 |
+
*.sln text eol=crlf
|
10 |
+
|
11 |
+
# Denote all files that are truly binary and should not be modified.
|
12 |
+
*.png binary
|
13 |
+
*.jpg binary
|
includes/classes/utils/Options.php
CHANGED
@@ -107,7 +107,7 @@ class TCMP_Options {
|
|
107 |
$key = $this->get_key( $key );
|
108 |
$result = $default;
|
109 |
if ( isset( $_POST[ $key ] ) ) {
|
110 |
-
if ( is_object($_POST[ $key ]) ) {
|
111 |
$result = clone $_POST[ $key ];
|
112 |
} else {
|
113 |
$result = $_POST[ $key ];
|
@@ -121,12 +121,14 @@ class TCMP_Options {
|
|
121 |
foreach ( $array as $key => &$value ) {
|
122 |
if ( is_array( $value ) ) {
|
123 |
$value = $this->recursive_wp_kses( $value );
|
124 |
-
}
|
125 |
global $tcmp_allowed_html_tags;
|
126 |
$value = wp_kses( $value, $tcmp_allowed_html_tags );
|
127 |
$value = str_replace( '<', '<', $value );
|
128 |
$value = str_replace( '>', '>', $value );
|
129 |
$value = str_replace( '&', '&', $value );
|
|
|
|
|
130 |
}
|
131 |
}
|
132 |
return $array;
|
107 |
$key = $this->get_key( $key );
|
108 |
$result = $default;
|
109 |
if ( isset( $_POST[ $key ] ) ) {
|
110 |
+
if ( is_object( $_POST[ $key ] ) ) {
|
111 |
$result = clone $_POST[ $key ];
|
112 |
} else {
|
113 |
$result = $_POST[ $key ];
|
121 |
foreach ( $array as $key => &$value ) {
|
122 |
if ( is_array( $value ) ) {
|
123 |
$value = $this->recursive_wp_kses( $value );
|
124 |
+
} elseif ( is_string( $value ) ) {
|
125 |
global $tcmp_allowed_html_tags;
|
126 |
$value = wp_kses( $value, $tcmp_allowed_html_tags );
|
127 |
$value = str_replace( '<', '<', $value );
|
128 |
$value = str_replace( '>', '>', $value );
|
129 |
$value = str_replace( '&', '&', $value );
|
130 |
+
} else {
|
131 |
+
// do nothing ... could be a video or graphics object
|
132 |
}
|
133 |
}
|
134 |
return $array;
|
includes/classes/utils/Utils.php
CHANGED
@@ -393,7 +393,7 @@ class TCMP_Utils {
|
|
393 |
foreach ( $array as $k => &$v ) {
|
394 |
if ( 'code' == $k ) {
|
395 |
$v = wp_kses( $v, $tcmp_allowed_html_tags );
|
396 |
-
}
|
397 |
$v = sanitize_text_field( $v );
|
398 |
}
|
399 |
}
|
@@ -1249,7 +1249,7 @@ class TCMP_Utils {
|
|
1249 |
$result = array();
|
1250 |
if ( false !== $array && count( $array ) > 0 ) {
|
1251 |
foreach ( $array as $i => $e ) {
|
1252 |
-
$text
|
1253 |
$id_exists = false;
|
1254 |
if ( is_array( $e ) || is_object( $e ) ) {
|
1255 |
foreach ( $e as $k => $v ) {
|
@@ -1315,7 +1315,7 @@ class TCMP_Utils {
|
|
1315 |
$success = false;
|
1316 |
foreach ( $when['conditions'] as $conditionKey => $condition_value ) {
|
1317 |
$condition_value = $tcmp->utils->to_array( $condition_value );
|
1318 |
-
$c
|
1319 |
if ( false !== $c ) {
|
1320 |
$c .= '';
|
1321 |
foreach ( $condition_value as $v ) {
|
@@ -1359,9 +1359,9 @@ class TCMP_Utils {
|
|
1359 |
return $buffer;
|
1360 |
}
|
1361 |
function arrayCase( $text ) {
|
1362 |
-
$buffer
|
1363 |
-
$array
|
1364 |
-
$text
|
1365 |
$prev_upper = false;
|
1366 |
$next_upper = false;
|
1367 |
foreach ( $text as $c ) {
|
@@ -1373,11 +1373,11 @@ class TCMP_Utils {
|
|
1373 |
}
|
1374 |
$c = strtoupper( $c );
|
1375 |
}
|
1376 |
-
$buffer
|
1377 |
$next_upper = false;
|
1378 |
$prev_upper = false;
|
1379 |
} elseif ( $c >= '0' && $c <= '9' ) {
|
1380 |
-
$buffer
|
1381 |
$next_upper = true;
|
1382 |
} elseif ( $c >= 'A' && $c <= 'Z' ) {
|
1383 |
if ( ! $prev_upper ) {
|
@@ -1386,7 +1386,7 @@ class TCMP_Utils {
|
|
1386 |
$buffer = '';
|
1387 |
}
|
1388 |
}
|
1389 |
-
$buffer
|
1390 |
$next_upper = false;
|
1391 |
$prev_upper = true;
|
1392 |
} else {
|
@@ -1409,7 +1409,7 @@ class TCMP_Utils {
|
|
1409 |
$text = strtolower( $text );
|
1410 |
}
|
1411 |
|
1412 |
-
$text
|
1413 |
$all_upper = true;
|
1414 |
$next_upper = false;
|
1415 |
foreach ( $text as $c ) {
|
@@ -1418,13 +1418,13 @@ class TCMP_Utils {
|
|
1418 |
if ( $next_upper ) {
|
1419 |
$c = strtoupper( $c );
|
1420 |
}
|
1421 |
-
$buffer
|
1422 |
$next_upper = false;
|
1423 |
} elseif ( $c >= '0' && $c <= '9' ) {
|
1424 |
-
$buffer
|
1425 |
$next_upper = true;
|
1426 |
} elseif ( $c >= 'A' && $c <= 'Z' ) {
|
1427 |
-
$buffer
|
1428 |
$next_upper = false;
|
1429 |
} else {
|
1430 |
$next_upper = true;
|
393 |
foreach ( $array as $k => &$v ) {
|
394 |
if ( 'code' == $k ) {
|
395 |
$v = wp_kses( $v, $tcmp_allowed_html_tags );
|
396 |
+
} elseif ( is_string( $v ) ) {
|
397 |
$v = sanitize_text_field( $v );
|
398 |
}
|
399 |
}
|
1249 |
$result = array();
|
1250 |
if ( false !== $array && count( $array ) > 0 ) {
|
1251 |
foreach ( $array as $i => $e ) {
|
1252 |
+
$text = $textFormat;
|
1253 |
$id_exists = false;
|
1254 |
if ( is_array( $e ) || is_object( $e ) ) {
|
1255 |
foreach ( $e as $k => $v ) {
|
1315 |
$success = false;
|
1316 |
foreach ( $when['conditions'] as $conditionKey => $condition_value ) {
|
1317 |
$condition_value = $tcmp->utils->to_array( $condition_value );
|
1318 |
+
$c = $this->get( $instance, $conditionKey, false );
|
1319 |
if ( false !== $c ) {
|
1320 |
$c .= '';
|
1321 |
foreach ( $condition_value as $v ) {
|
1359 |
return $buffer;
|
1360 |
}
|
1361 |
function arrayCase( $text ) {
|
1362 |
+
$buffer = '';
|
1363 |
+
$array = array();
|
1364 |
+
$text = str_split( $text );
|
1365 |
$prev_upper = false;
|
1366 |
$next_upper = false;
|
1367 |
foreach ( $text as $c ) {
|
1373 |
}
|
1374 |
$c = strtoupper( $c );
|
1375 |
}
|
1376 |
+
$buffer .= $c;
|
1377 |
$next_upper = false;
|
1378 |
$prev_upper = false;
|
1379 |
} elseif ( $c >= '0' && $c <= '9' ) {
|
1380 |
+
$buffer .= $c;
|
1381 |
$next_upper = true;
|
1382 |
} elseif ( $c >= 'A' && $c <= 'Z' ) {
|
1383 |
if ( ! $prev_upper ) {
|
1386 |
$buffer = '';
|
1387 |
}
|
1388 |
}
|
1389 |
+
$buffer .= $c;
|
1390 |
$next_upper = false;
|
1391 |
$prev_upper = true;
|
1392 |
} else {
|
1409 |
$text = strtolower( $text );
|
1410 |
}
|
1411 |
|
1412 |
+
$text = str_split( $text );
|
1413 |
$all_upper = true;
|
1414 |
$next_upper = false;
|
1415 |
foreach ( $text as $c ) {
|
1418 |
if ( $next_upper ) {
|
1419 |
$c = strtoupper( $c );
|
1420 |
}
|
1421 |
+
$buffer .= $c;
|
1422 |
$next_upper = false;
|
1423 |
} elseif ( $c >= '0' && $c <= '9' ) {
|
1424 |
+
$buffer .= $c;
|
1425 |
$next_upper = true;
|
1426 |
} elseif ( $c >= 'A' && $c <= 'Z' ) {
|
1427 |
+
$buffer .= $c;
|
1428 |
$next_upper = false;
|
1429 |
} else {
|
1430 |
$next_upper = true;
|
index.php
CHANGED
@@ -6,7 +6,7 @@ Description: A plugin to manage ALL your tracking code and conversion pixels, si
|
|
6 |
Author: Data443
|
7 |
Author URI: https://data443.com/
|
8 |
Email: info@intellywp.com
|
9 |
-
Version: 2.0.
|
10 |
Requires at least: 3.6.0
|
11 |
Requires PHP: 5.6
|
12 |
*/
|
@@ -27,7 +27,7 @@ define( 'TCMP_PLUGIN_PREFIX', 'TCMP_' );
|
|
27 |
define( 'TCMP_PLUGIN_FILE', __FILE__ );
|
28 |
define( 'TCMP_PLUGIN_SLUG', 'tracking-code-manager' );
|
29 |
define( 'TCMP_PLUGIN_NAME', 'Tracking Code Manager' );
|
30 |
-
define( 'TCMP_PLUGIN_VERSION', '2.0.
|
31 |
define( 'TCMP_PLUGIN_AUTHOR', 'IntellyWP' );
|
32 |
|
33 |
define( 'TCMP_PLUGIN_DIR', dirname( __FILE__ ) . '/' );
|
@@ -125,6 +125,7 @@ $tcmp_allowed_atts = array(
|
|
125 |
'defer' => array(),
|
126 |
'integrity' => array(),
|
127 |
'nomodule' => array(),
|
|
|
128 |
);
|
129 |
$tcmp_allowed_html_tags['form'] = $tcmp_allowed_atts;
|
130 |
$tcmp_allowed_html_tags['label'] = $tcmp_allowed_atts;
|
@@ -161,6 +162,7 @@ $tcmp_allowed_html_tags['p'] = $tcmp_allowed_atts;
|
|
161 |
$tcmp_allowed_html_tags['a'] = $tcmp_allowed_atts;
|
162 |
$tcmp_allowed_html_tags['b'] = $tcmp_allowed_atts;
|
163 |
$tcmp_allowed_html_tags['i'] = $tcmp_allowed_atts;
|
|
|
164 |
|
165 |
global $tcmp;
|
166 |
$tcmp = new TCMP_Singleton();
|
6 |
Author: Data443
|
7 |
Author URI: https://data443.com/
|
8 |
Email: info@intellywp.com
|
9 |
+
Version: 2.0.11
|
10 |
Requires at least: 3.6.0
|
11 |
Requires PHP: 5.6
|
12 |
*/
|
27 |
define( 'TCMP_PLUGIN_FILE', __FILE__ );
|
28 |
define( 'TCMP_PLUGIN_SLUG', 'tracking-code-manager' );
|
29 |
define( 'TCMP_PLUGIN_NAME', 'Tracking Code Manager' );
|
30 |
+
define( 'TCMP_PLUGIN_VERSION', '2.0.11' );
|
31 |
define( 'TCMP_PLUGIN_AUTHOR', 'IntellyWP' );
|
32 |
|
33 |
define( 'TCMP_PLUGIN_DIR', dirname( __FILE__ ) . '/' );
|
125 |
'defer' => array(),
|
126 |
'integrity' => array(),
|
127 |
'nomodule' => array(),
|
128 |
+
'onload' => array(),
|
129 |
);
|
130 |
$tcmp_allowed_html_tags['form'] = $tcmp_allowed_atts;
|
131 |
$tcmp_allowed_html_tags['label'] = $tcmp_allowed_atts;
|
162 |
$tcmp_allowed_html_tags['a'] = $tcmp_allowed_atts;
|
163 |
$tcmp_allowed_html_tags['b'] = $tcmp_allowed_atts;
|
164 |
$tcmp_allowed_html_tags['i'] = $tcmp_allowed_atts;
|
165 |
+
$tcmp_allowed_html_tags['body'] = $tcmp_allowed_atts;
|
166 |
|
167 |
global $tcmp;
|
168 |
$tcmp = new TCMP_Singleton();
|
readme.txt
CHANGED
@@ -112,6 +112,11 @@ Have a look at the source code of your page (search for: Tracking Code Manager)
|
|
112 |
|
113 |
For detailed release notes, see our documentation here: [https://intellywp.com/docs/category/tracking-code-manager/](https://intellywp.com/docs/category/tracking-code-manager/).
|
114 |
|
|
|
|
|
|
|
|
|
|
|
115 |
= 2.0.10 =
|
116 |
*Release Date - 2022-7-12*
|
117 |
|
112 |
|
113 |
For detailed release notes, see our documentation here: [https://intellywp.com/docs/category/tracking-code-manager/](https://intellywp.com/docs/category/tracking-code-manager/).
|
114 |
|
115 |
+
= 2.0.11 =
|
116 |
+
*Release Date - 2022-7-13*
|
117 |
+
|
118 |
+
* IWP-465 Fix issue with sanitizing image/video objects
|
119 |
+
|
120 |
= 2.0.10 =
|
121 |
*Release Date - 2022-7-12*
|
122 |
|