Tracking Code Manager - Version 2.0.14

Version Description

Release Date - 2022-8-18

  • IWP-487 Update the html tag list used to sanitize codes
Download this release

Release Info

Developer data443
Plugin Icon 128x128 Tracking Code Manager
Version 2.0.14
Comparing to
See all releases

Code changes from version 2.0.13 to 2.0.14

includes/admin/AdminOptions.php CHANGED
@@ -15,6 +15,7 @@ function tcmp_ui_admin_options() {
15
  $tcmp->options->setAdditionalRecognizedTags( $tcmp->utils->qs( 'tags' ) );
16
  $tcmp->options->setAdditionalRecognizedAttributes( $tcmp->utils->qs( 'attributes' ) );
17
  tcmp_add_additional_tags_atts();
 
18
  }
19
 
20
  $tcmp->form->p( __( 'Add additional tags and/or attributes to the code whitelist' ) );
15
  $tcmp->options->setAdditionalRecognizedTags( $tcmp->utils->qs( 'tags' ) );
16
  $tcmp->options->setAdditionalRecognizedAttributes( $tcmp->utils->qs( 'attributes' ) );
17
  tcmp_add_additional_tags_atts();
18
+ $tcmp->options->writeMessages();
19
  }
20
 
21
  $tcmp->form->p( __( 'Add additional tags and/or attributes to the code whitelist' ) );
includes/classes/utils/Options.php CHANGED
@@ -456,10 +456,10 @@ class TCMP_Options {
456
 
457
  // Add additional recognized tags and attributes
458
  public function getAdditionalRecognizedTags() {
459
- return $this->getOption( 'additionalRecognizedTags', 'script' );
460
  }
461
  public function getAdditionalRecognizedAttributes() {
462
- return $this->getOption( 'additionalRecognizedAttributes', 'data-cbid,data-blockingmode' );
463
  }
464
  public function setAdditionalRecognizedTags( $text ) {
465
  if (is_string($text)) {
456
 
457
  // Add additional recognized tags and attributes
458
  public function getAdditionalRecognizedTags() {
459
+ return $this->getOption( 'additionalRecognizedTags', '' );
460
  }
461
  public function getAdditionalRecognizedAttributes() {
462
+ return $this->getOption( 'additionalRecognizedAttributes', '' );
463
  }
464
  public function setAdditionalRecognizedTags( $text ) {
465
  if (is_string($text)) {
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: support@data443.com
9
- Version: 2.0.13
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.13' );
31
  define( 'TCMP_PLUGIN_AUTHOR', 'IntellyWP' );
32
 
33
  define( 'TCMP_PLUGIN_DIR', dirname( __FILE__ ) . '/' );
@@ -91,78 +91,89 @@ tcmp_include_php( dirname( __FILE__ ) . '/includes/' );
91
 
92
  global $tcmp_allowed_html_tags;
93
  $tcmp_allowed_atts = array(
94
- 'align' => array(),
95
- 'class' => array(),
96
- 'type' => array(),
97
- 'id' => array(),
98
- 'dir' => array(),
99
- 'lang' => array(),
100
- 'style' => array(),
101
- 'xml:lang' => array(),
102
- 'src' => array(),
103
- 'alt' => array(),
104
- 'href' => array(),
105
- 'rel' => array(),
106
- 'rev' => array(),
107
- 'target' => array(),
108
- 'novalidate' => array(),
109
- 'type' => array(),
110
- 'value' => array(),
111
- 'name' => array(),
112
- 'tabindex' => array(),
113
- 'action' => array(),
114
- 'method' => array(),
115
- 'for' => array(),
116
- 'width' => array(),
117
- 'height' => array(),
118
- 'data' => array(),
119
- 'title' => array(),
120
- 'async' => array(),
121
- 'loading' => array(),
122
- 'referrerpolicy' => array(),
123
- 'sandbox' => array(),
124
- 'crossorigin' => array(),
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;
132
- $tcmp_allowed_html_tags['input'] = $tcmp_allowed_atts;
133
- $tcmp_allowed_html_tags['textarea'] = $tcmp_allowed_atts;
134
- $tcmp_allowed_html_tags['iframe'] = $tcmp_allowed_atts;
135
- $tcmp_allowed_html_tags['script'] = $tcmp_allowed_atts;
136
- $tcmp_allowed_html_tags['noscript'] = $tcmp_allowed_atts;
137
- $tcmp_allowed_html_tags['style'] = $tcmp_allowed_atts;
138
- $tcmp_allowed_html_tags['strong'] = $tcmp_allowed_atts;
139
- $tcmp_allowed_html_tags['small'] = $tcmp_allowed_atts;
140
- $tcmp_allowed_html_tags['table'] = $tcmp_allowed_atts;
141
- $tcmp_allowed_html_tags['span'] = $tcmp_allowed_atts;
142
  $tcmp_allowed_html_tags['abbr'] = $tcmp_allowed_atts;
 
 
 
143
  $tcmp_allowed_html_tags['code'] = $tcmp_allowed_atts;
144
- $tcmp_allowed_html_tags['pre'] = $tcmp_allowed_atts;
145
  $tcmp_allowed_html_tags['div'] = $tcmp_allowed_atts;
146
- $tcmp_allowed_html_tags['img'] = $tcmp_allowed_atts;
 
147
  $tcmp_allowed_html_tags['h1'] = $tcmp_allowed_atts;
148
  $tcmp_allowed_html_tags['h2'] = $tcmp_allowed_atts;
149
  $tcmp_allowed_html_tags['h3'] = $tcmp_allowed_atts;
150
  $tcmp_allowed_html_tags['h4'] = $tcmp_allowed_atts;
151
  $tcmp_allowed_html_tags['h5'] = $tcmp_allowed_atts;
152
  $tcmp_allowed_html_tags['h6'] = $tcmp_allowed_atts;
153
- $tcmp_allowed_html_tags['ol'] = $tcmp_allowed_atts;
154
- $tcmp_allowed_html_tags['ul'] = $tcmp_allowed_atts;
155
- $tcmp_allowed_html_tags['li'] = $tcmp_allowed_atts;
156
- $tcmp_allowed_html_tags['em'] = $tcmp_allowed_atts;
157
  $tcmp_allowed_html_tags['hr'] = $tcmp_allowed_atts;
158
- $tcmp_allowed_html_tags['br'] = $tcmp_allowed_atts;
159
- $tcmp_allowed_html_tags['tr'] = $tcmp_allowed_atts;
160
- $tcmp_allowed_html_tags['td'] = $tcmp_allowed_atts;
161
- $tcmp_allowed_html_tags['p'] = $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();
@@ -172,19 +183,56 @@ function tcmp_add_additional_tags_atts() {
172
  global $tcmp;
173
  global $tcmp_allowed_html_tags;
174
  global $tcmp_allowed_atts;
175
- $tags = explode( ",", sanitize_text_field( $tcmp->options->getAdditionalRecognizedTags() ) );
176
- $attrs = explode( ",", sanitize_text_field( $tcmp->options->getAdditionalRecognizedAttributes() ) );
177
-
178
- foreach ( $tags as $tag ) {
179
- $tag = trim( $tag );
180
- $current_attrs = $tcmp_allowed_html_tags[$tag];
181
- foreach ( $attrs as $k ) {
182
- $k = trim( $k );
183
- if ( !isset( $current_attrs[$k]) ) {
184
- $current_attrs[$k] = array();
 
 
 
 
 
 
 
 
 
185
  }
186
  }
187
- $tcmp_allowed_html_tags[$tag] = $current_attrs;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  }
189
  }
190
 
6
  Author: Data443
7
  Author URI: https://data443.com/
8
  Email: support@data443.com
9
+ Version: 2.0.14
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.14' );
31
  define( 'TCMP_PLUGIN_AUTHOR', 'IntellyWP' );
32
 
33
  define( 'TCMP_PLUGIN_DIR', dirname( __FILE__ ) . '/' );
91
 
92
  global $tcmp_allowed_html_tags;
93
  $tcmp_allowed_atts = array(
94
+ 'action' => array(),
95
+ 'align' => array(),
96
+ 'alt' => array(),
97
+ 'async' => array(),
98
+ 'class' => array(),
99
+ 'content' => array(),
100
+ 'crossorigin' => array(),
101
+ 'data-blockingmode' => array(),
102
+ 'data-cbid' => array(),
103
+ 'data-form-block-id' => array(),
104
+ 'data-hostname' => array(),
105
+ 'data-website-id' => array(),
106
+ 'data' => array(),
107
+ 'defer' => array(),
108
+ 'dir' => array(),
109
+ 'for' => array(),
110
+ 'height' => array(),
111
+ 'href' => array(),
112
+ 'id' => array(),
113
+ 'integrity' => array(),
114
+ 'lang' => array(),
115
+ 'loading' => array(),
116
+ 'method' => array(),
117
+ 'name' => array(),
118
+ 'nomodule' => array(),
119
+ 'novalidate' => array(),
120
+ 'onload' => array(),
121
+ 'referrerpolicy' => array(),
122
+ 'rel' => array(),
123
+ 'rev' => array(),
124
+ 'sandbox' => array(),
125
+ 'src' => array(),
126
+ 'style' => array(),
127
+ 'tabindex' => array(),
128
+ 'target' => array(),
129
+ 'title' => array(),
130
+ 'type' => array(),
131
+ 'uetq' => array(),
132
+ 'value' => array(),
133
+ 'width' => array(),
134
+ 'xml:lang' => array(),
135
  );
136
+ $tcmp_allowed_html_tags['a'] = $tcmp_allowed_atts;
 
 
 
 
 
 
 
 
 
 
 
137
  $tcmp_allowed_html_tags['abbr'] = $tcmp_allowed_atts;
138
+ $tcmp_allowed_html_tags['b'] = $tcmp_allowed_atts;
139
+ $tcmp_allowed_html_tags['body'] = $tcmp_allowed_atts;
140
+ $tcmp_allowed_html_tags['br'] = $tcmp_allowed_atts;
141
  $tcmp_allowed_html_tags['code'] = $tcmp_allowed_atts;
 
142
  $tcmp_allowed_html_tags['div'] = $tcmp_allowed_atts;
143
+ $tcmp_allowed_html_tags['em'] = $tcmp_allowed_atts;
144
+ $tcmp_allowed_html_tags['form'] = $tcmp_allowed_atts;
145
  $tcmp_allowed_html_tags['h1'] = $tcmp_allowed_atts;
146
  $tcmp_allowed_html_tags['h2'] = $tcmp_allowed_atts;
147
  $tcmp_allowed_html_tags['h3'] = $tcmp_allowed_atts;
148
  $tcmp_allowed_html_tags['h4'] = $tcmp_allowed_atts;
149
  $tcmp_allowed_html_tags['h5'] = $tcmp_allowed_atts;
150
  $tcmp_allowed_html_tags['h6'] = $tcmp_allowed_atts;
 
 
 
 
151
  $tcmp_allowed_html_tags['hr'] = $tcmp_allowed_atts;
 
 
 
 
 
 
152
  $tcmp_allowed_html_tags['i'] = $tcmp_allowed_atts;
153
+ $tcmp_allowed_html_tags['iframe'] = $tcmp_allowed_atts;
154
+ $tcmp_allowed_html_tags['img'] = $tcmp_allowed_atts;
155
+ $tcmp_allowed_html_tags['input'] = $tcmp_allowed_atts;
156
+ $tcmp_allowed_html_tags['label'] = $tcmp_allowed_atts;
157
+ $tcmp_allowed_html_tags['li'] = $tcmp_allowed_atts;
158
+ $tcmp_allowed_html_tags['meta'] = $tcmp_allowed_atts;
159
+ $tcmp_allowed_html_tags['noscript'] = $tcmp_allowed_atts;
160
+ $tcmp_allowed_html_tags['ol'] = $tcmp_allowed_atts;
161
+ $tcmp_allowed_html_tags['p'] = $tcmp_allowed_atts;
162
+ $tcmp_allowed_html_tags['pre'] = $tcmp_allowed_atts;
163
+ $tcmp_allowed_html_tags['script'] = $tcmp_allowed_atts;
164
+ $tcmp_allowed_html_tags['small'] = $tcmp_allowed_atts;
165
+ $tcmp_allowed_html_tags['span'] = $tcmp_allowed_atts;
166
+ $tcmp_allowed_html_tags['strong'] = $tcmp_allowed_atts;
167
+ $tcmp_allowed_html_tags['style'] = $tcmp_allowed_atts;
168
+ $tcmp_allowed_html_tags['table'] = $tcmp_allowed_atts;
169
+ $tcmp_allowed_html_tags['td'] = $tcmp_allowed_atts;
170
+ $tcmp_allowed_html_tags['textarea'] = $tcmp_allowed_atts;
171
+ $tcmp_allowed_html_tags['tr'] = $tcmp_allowed_atts;
172
+ $tcmp_allowed_html_tags['ul'] = $tcmp_allowed_atts;
173
+ global $tcmp_default_tags;
174
+ global $tcmp_default_attrs;
175
+ $tcmp_default_tags = $tcmp_allowed_html_tags;
176
+ $tcmp_default_attrs = $tcmp_allowed_atts;
177
 
178
  global $tcmp;
179
  $tcmp = new TCMP_Singleton();
183
  global $tcmp;
184
  global $tcmp_allowed_html_tags;
185
  global $tcmp_allowed_atts;
186
+ global $tcmp_default_tags;
187
+ global $tcmp_default_attrs;
188
+
189
+ $tags = explode( ',', sanitize_text_field( $tcmp->options->getAdditionalRecognizedTags() ) );
190
+ $attrs = explode( ',', sanitize_text_field( $tcmp->options->getAdditionalRecognizedAttributes() ) );
191
+
192
+ $remove = false;
193
+ $update_attrs = array();
194
+ foreach ( $attrs as $a ) {
195
+ $a = trim( $a );
196
+ if ( strlen( $a ) > 0 ) {
197
+ if ( ! isset( $tcmp_allowed_atts[ $a ] ) ) {
198
+ $tcmp_allowed_atts[ $a ] = array();
199
+ $update_attrs[] = $a;
200
+ } else {
201
+ if ( isset( $tcmp_default_attrs[ $a ] ) ) {
202
+ $tcmp->options->pushInfoMessage( '<span style="text-transform:uppercase"><strong>' . $a . '</strong></span> is already in the attribute whitelist' );
203
+ $remove = true;
204
+ }
205
  }
206
  }
207
+ }
208
+ if ( $remove ) {
209
+ $new = implode( ',', $update_attrs );
210
+ $tcmp->options->setAdditionalRecognizedAttributes( $new );
211
+ }
212
+
213
+ $remove = false;
214
+ $update_tags = array();
215
+ foreach ( $tags as $t ) {
216
+ $t = trim( $t );
217
+ if ( strlen( $t ) > 0 ) {
218
+ if ( ! isset( $tcmp_allowed_html_tags[ $t ] ) ) {
219
+ $tcmp_allowed_html_tags[ $t ] = array();
220
+ $update_tags[] = $t;
221
+ } else {
222
+ if ( isset( $tcmp_default_tags[ $t ] ) ) {
223
+ $tcmp->options->pushInfoMessage( '<span style="text-transform:uppercase"><strong>' . $t . '</strong></span> is already in the tag whitelist' );
224
+ $remove = true;
225
+ }
226
+ }
227
+ }
228
+ }
229
+ if ( $remove ) {
230
+ $new = implode( ',', $update_tags );
231
+ $tcmp->options->setAdditionalRecognizedTags( $new );
232
+ }
233
+
234
+ foreach ( $tcmp_allowed_html_tags as $key => $value ) {
235
+ $tcmp_allowed_html_tags[ $key ] = $tcmp_allowed_atts;
236
  }
237
  }
238
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: IntellyWP, Data443
3
  Tags: adwords remarketing, analytics conversion tracking, conversion pixel, conversion tracking, conversion tracking adwords, conversion tracking pixel, conversion tracking script,Facebook Ads, facebook conversion pixel, facebook custom audience, facebook retargeting, google adwords, google analytics web tracking code, google tag manager, html snippet, html snippets, html tracking code, javascript snippet, javascript snippets, header and footer, pay per click tracking, pixel tracking code, remarketing, retargeting, snippets, Tag Management, track conversion, track conversions, tracking code, tracking codes, tracking script, woocommerce, edd, easy digital downloads, wp ecommerce, wp e-commerce, gdpr, tracking gdpr, privacy
4
  Requires at least: 2.7
5
  Tested up to: 6.0
6
- Stable tag: 2.0.13
7
  Requires PHP: 5.6
8
 
9
  A plugin to manage ALL of your tracking code and conversion pixels. Compatible with Facebook Ads, Google Adwords, WooCommerce, Easy Digital Downloads, ..
@@ -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.13 =
116
  *Release Date - 2022-7-26*
117
 
3
  Tags: adwords remarketing, analytics conversion tracking, conversion pixel, conversion tracking, conversion tracking adwords, conversion tracking pixel, conversion tracking script,Facebook Ads, facebook conversion pixel, facebook custom audience, facebook retargeting, google adwords, google analytics web tracking code, google tag manager, html snippet, html snippets, html tracking code, javascript snippet, javascript snippets, header and footer, pay per click tracking, pixel tracking code, remarketing, retargeting, snippets, Tag Management, track conversion, track conversions, tracking code, tracking codes, tracking script, woocommerce, edd, easy digital downloads, wp ecommerce, wp e-commerce, gdpr, tracking gdpr, privacy
4
  Requires at least: 2.7
5
  Tested up to: 6.0
6
+ Stable tag: 2.0.14
7
  Requires PHP: 5.6
8
 
9
  A plugin to manage ALL of your tracking code and conversion pixels. Compatible with Facebook Ads, Google Adwords, WooCommerce, Easy Digital Downloads, ..
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.14 =
116
+ *Release Date - 2022-8-18*
117
+
118
+ * IWP-487 Update the html tag list used to sanitize codes
119
+
120
  = 2.0.13 =
121
  *Release Date - 2022-7-26*
122