WP DSGVO Tools - Version 3.1.17

Version Description

  • fixed issues with some embeddings
Download this release

Release Info

Developer legalweb
Plugin Icon 128x128 WP DSGVO Tools
Version 3.1.17
Comparing to
See all releases

Code changes from version 3.1.15 to 3.1.17

README.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://legalweb.io
4
  Tags: gdpr, dsgvo, datenschutz, privacy, privacy policy, imprint, impressum, wordpress, compliance, privacy, woocommerce, law
5
  Requires at least: 3.0.1
6
  Tested up to: 5.6.0
7
- Stable tag: 3.1.15
8
  Requires PHP: 5.6.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -201,6 +201,12 @@ Just install via wordpress plugin feature or upload zip and activate it.
201
 
202
 
203
  == Changelog ==
 
 
 
 
 
 
204
  = 3.1.15 =
205
  * implemented/raising an JS Event 'lw-optinout' when an opt-in or opt-out was made
206
  * possibility to let visitors decide if necessary integrations should be enabled
4
  Tags: gdpr, dsgvo, datenschutz, privacy, privacy policy, imprint, impressum, wordpress, compliance, privacy, woocommerce, law
5
  Requires at least: 3.0.1
6
  Tested up to: 5.6.0
7
+ Stable tag: 3.1.17
8
  Requires PHP: 5.6.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
201
 
202
 
203
  == Changelog ==
204
+ = 3.1.17 =
205
+ * fixed issues with some embeddings
206
+
207
+ = 3.1.16 =
208
+ * improved embeddings
209
+
210
  = 3.1.15 =
211
  * implemented/raising an JS Event 'lw-optinout' when an opt-in or opt-out was made
212
  * possibility to let visitors decide if necessary integrations should be enabled
includes/class-sp-dsgvo-embeddings-manager.php CHANGED
@@ -102,7 +102,10 @@ class SPDSGVOEmbeddingsManager
102
  }
103
  if ($found == false || $embeddingApi == null) return $content;
104
 
105
- $originalContentBase64Encoded = base64_encode($content);
 
 
 
106
  $processedContent = $embeddingApi->processContent($content);
107
 
108
  $customCssClasses = SPDSGVOSettings::get('embed_placeholder_custom_css_classes');
102
  }
103
  if ($found == false || $embeddingApi == null) return $content;
104
 
105
+ // if its allowed by cookie nothing is to do here. otherwise replace iframes, show image, add optin handler
106
+ if ($embeddingApi->checkIfIntegrationIsAllowed($embeddingApi->slug) == true) return $content;
107
+
108
+ $originalContentBase64Encoded = base64_encode(htmlentities($content));
109
  $processedContent = $embeddingApi->processContent($content);
110
 
111
  $customCssClasses = SPDSGVOSettings::get('embed_placeholder_custom_css_classes');
includes/integrations/embeddings/gmaps/class-sp-dsgvo-gmaps-integration.php CHANGED
@@ -30,7 +30,7 @@ class SPDSGVOGmapsIntegration extends SPDSGVOIntegration{
30
 
31
  // delete old setting from times before we had embeddings
32
  $legacySettings = SPDSGVOSettings::get('page_basics_embeddings');
33
- if (in_array('google-maps', $legacySettings))
34
  {
35
  $legacySettings = array_diff($legacySettings, array('google-maps'));
36
  SPDSGVOSettings::set('page_basics_embeddings',$legacySettings);
30
 
31
  // delete old setting from times before we had embeddings
32
  $legacySettings = SPDSGVOSettings::get('page_basics_embeddings');
33
+ if (is_array($legacySettings) && in_array('google-maps', $legacySettings))
34
  {
35
  $legacySettings = array_diff($legacySettings, array('google-maps'));
36
  SPDSGVOSettings::set('page_basics_embeddings',$legacySettings);
includes/integrations/embeddings/openstreetmap/class-sp-dsgvo-openstreetmap-integration.php CHANGED
@@ -30,7 +30,7 @@ class SPDSGVOOpenstreetmapIntegration extends SPDSGVOIntegration{
30
 
31
  // delete old setting from times before we had embeddings
32
  $legacySettings = SPDSGVOSettings::get('page_basics_embeddings');
33
- if (in_array('open-street-map', $legacySettings))
34
  {
35
  $legacySettings = array_diff($legacySettings, array('open-street-map'));
36
  SPDSGVOSettings::set('page_basics_embeddings',$legacySettings);
30
 
31
  // delete old setting from times before we had embeddings
32
  $legacySettings = SPDSGVOSettings::get('page_basics_embeddings');
33
+ if (is_array($legacySettings) && in_array('open-street-map', $legacySettings))
34
  {
35
  $legacySettings = array_diff($legacySettings, array('open-street-map'));
36
  SPDSGVOSettings::set('page_basics_embeddings',$legacySettings);
includes/integrations/embeddings/vimeo/class-sp-dsgvo-vimeo-integration.php CHANGED
@@ -30,7 +30,7 @@ class SPDSGVOVimeoIntegration extends SPDSGVOIntegration{
30
 
31
  // delete old setting from times before we had embeddings
32
  $legacySettings = SPDSGVOSettings::get('page_basics_embeddings');
33
- if (in_array('vimeo', $legacySettings))
34
  {
35
  $legacySettings = array_diff($legacySettings, array('vimeo'));
36
  SPDSGVOSettings::set('page_basics_embeddings',$legacySettings);
30
 
31
  // delete old setting from times before we had embeddings
32
  $legacySettings = SPDSGVOSettings::get('page_basics_embeddings');
33
+ if (is_array($legacySettings) && in_array('vimeo', $legacySettings))
34
  {
35
  $legacySettings = array_diff($legacySettings, array('vimeo'));
36
  SPDSGVOSettings::set('page_basics_embeddings',$legacySettings);
includes/integrations/embeddings/youtube/class-sp-dsgvo-youtube-integration.php CHANGED
@@ -30,7 +30,7 @@ class SPDSGVOYoutubeIntegration extends SPDSGVOIntegration{
30
 
31
  // delete old setting from times before we had embeddings
32
  $legacySettings = SPDSGVOSettings::get('page_basics_embeddings');
33
- if (in_array('youtube', $legacySettings))
34
  {
35
  $legacySettings = array_diff($legacySettings, array('youtube'));
36
  SPDSGVOSettings::set('page_basics_embeddings',$legacySettings);
30
 
31
  // delete old setting from times before we had embeddings
32
  $legacySettings = SPDSGVOSettings::get('page_basics_embeddings');
33
+ if (is_array($legacySettings) && in_array('youtube', $legacySettings))
34
  {
35
  $legacySettings = array_diff($legacySettings, array('youtube'));
36
  SPDSGVOSettings::set('page_basics_embeddings',$legacySettings);
languages/shapepress-dsgvo-de_DE.mo CHANGED
Binary file
languages/shapepress-dsgvo-de_DE.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: \n"
4
- "POT-Creation-Date: 2021-01-22 09:06+0100\n"
5
- "PO-Revision-Date: 2021-01-22 09:09+0100\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: de_DE\n"
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: \n"
4
+ "POT-Creation-Date: 2021-01-22 09:09+0100\n"
5
+ "PO-Revision-Date: 2021-01-22 09:49+0100\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: de_DE\n"
public/js/sp-dsgvo-public.js CHANGED
@@ -737,17 +737,57 @@ const CATEGORY_SLUG_MANDATORY = 'necessary';
737
  if (base64EncContent == null || base64EncContent.html() == null || base64EncContent.html() == '') return;
738
 
739
  try {
 
740
  var decodedContent = atob(base64EncContent.html());
 
 
 
 
741
  slugContainer.empty();
742
- slugContainer.append($(decodedContent));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
743
  }
744
  catch (e) {
745
- console.log('could not enable embedding: '+ integrationObject.slug);
746
  }
747
 
748
 
749
  });
750
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
751
  var optinEvent = new CustomEvent(
752
  "lw-optinout",
753
  {
@@ -765,19 +805,6 @@ const CATEGORY_SLUG_MANDATORY = 'necessary';
765
  document.querySelector('.sp-dsgvo-privacy-popup').dispatchEvent(optinEvent);
766
  }
767
 
768
- function enableEmbeddingByPlaceholderClick(embeddingSlug)
769
- {
770
- var currentConfig = getEnabledIntegrationsFromCookie();
771
-
772
- var integrationObject = getIntegrationConfigBySlug(embeddingSlug);
773
- if (integrationObject == null) return;
774
-
775
- enableEmbeddingIntegration(integrationObject);
776
- currentConfig.push(embeddingSlug);
777
-
778
- refreshCookie(currentConfig);
779
- }
780
-
781
  function removeCookiesOfDisabledIntegrations(enabledIntegrationsBeforeClosing)
782
  {
783
  var reloadNeeded = 0;
737
  if (base64EncContent == null || base64EncContent.html() == null || base64EncContent.html() == '') return;
738
 
739
  try {
740
+
741
  var decodedContent = atob(base64EncContent.html());
742
+ var txt = document.createElement("textarea");
743
+ txt.innerHTML = decodedContent;
744
+ var htmlContentOnly = $.parseHTML(txt.value);
745
+
746
  slugContainer.empty();
747
+ slugContainer.append((htmlContentOnly));
748
+
749
+ var parsedDocument = new DOMParser().parseFromString(decodedContent, "text/html");
750
+ var scripts = parsedDocument.getElementsByTagName('script');
751
+
752
+ if (scripts.length > 0) {
753
+
754
+
755
+
756
+ // iterate over all script tags and create a duplicate tags for each
757
+
758
+ for (var i = 0; i < scripts.length; i++) {
759
+ var s = document.createElement('script');
760
+ s.innerHTML = scripts[i].innerHTML;
761
+ s.async = scripts[i].async;
762
+ if (scripts[i].src != null && scripts[i].src != '') s.src = scripts[i].src;
763
+ if (scripts[i].type != null && scripts[i].type != '') s.type = scripts[i].type;
764
+ // add the new node to the page
765
+ this.appendChild(s);
766
+ }
767
+ }
768
  }
769
  catch (e) {
770
+ console.log('could not enable embedding: '+ integrationObject.slug);
771
  }
772
 
773
 
774
  });
775
 
776
+
777
+ }
778
+
779
+ function enableEmbeddingByPlaceholderClick(embeddingSlug)
780
+ {
781
+ var currentConfig = getEnabledIntegrationsFromCookie();
782
+
783
+ var integrationObject = getIntegrationConfigBySlug(embeddingSlug);
784
+ if (integrationObject == null) return;
785
+
786
+ enableEmbeddingIntegration(integrationObject);
787
+ currentConfig.push(embeddingSlug);
788
+
789
+ refreshCookie(currentConfig);
790
+
791
  var optinEvent = new CustomEvent(
792
  "lw-optinout",
793
  {
805
  document.querySelector('.sp-dsgvo-privacy-popup').dispatchEvent(optinEvent);
806
  }
807
 
 
 
 
 
 
 
 
 
 
 
 
 
 
808
  function removeCookiesOfDisabledIntegrations(enabledIntegrationsBeforeClosing)
809
  {
810
  var reloadNeeded = 0;
public/shortcodes/content-block-shortcode.php CHANGED
@@ -15,8 +15,10 @@ function SPDSGVOContentBlockShortcode($atts, $content){
15
 
16
  $embeddingApi = SPDSGVOEmbeddingsManager::getInstance()->getEmbeddingApiBySlug($slug);
17
  if ($embeddingApi == null) return $content;
 
 
18
 
19
- $originalContentBase64Encoded = base64_encode($content);
20
  $processedContent = $embeddingApi->processContent($content);
21
 
22
  $customCssClasses = SPDSGVOSettings::get('embed_placeholder_custom_css_classes');
15
 
16
  $embeddingApi = SPDSGVOEmbeddingsManager::getInstance()->getEmbeddingApiBySlug($slug);
17
  if ($embeddingApi == null) return $content;
18
+ // if its allowed by cookie nothing is to do here. otherwise replace iframes, show image, add optin handler
19
+ if ($embeddingApi->checkIfIntegrationIsAllowed($embeddingApi->slug) == true) return $content;
20
 
21
+ $originalContentBase64Encoded = base64_encode(htmlentities($content));
22
  $processedContent = $embeddingApi->processContent($content);
23
 
24
  $customCssClasses = SPDSGVOSettings::get('embed_placeholder_custom_css_classes');
sp-dsgvo.php CHANGED
@@ -16,7 +16,7 @@
16
  * Plugin Name: WP DSGVO Tools (GDPR)
17
  * Plugin URI: https://legalweb.io
18
  * Description: WP DSGVO Tools (GDPR) help you to fulfill the GDPR (DGSVO) compliance guidance (<a target="_blank" href="https://ico.org.uk/for-organisations/data-protection-reform/overview-of-the-gdpr/">GDPR</a>)
19
- * Version: 3.1.15
20
  * Author: legalweb
21
  * Author URI: https://www.legalweb.io
22
  * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
@@ -28,7 +28,7 @@ if (! defined('WPINC')) {
28
  die();
29
  }
30
 
31
- define('sp_dsgvo_VERSION', '3.1.15');
32
  define('sp_dsgvo_NAME', 'sp-dsgvo');
33
  define('sp_dsgvo_PLUGIN_NAME', 'shapepress-dsgvo');
34
  define('sp_dsgvo_LEGAL_TEXTS_MIN_VERSION', '1579021814');
16
  * Plugin Name: WP DSGVO Tools (GDPR)
17
  * Plugin URI: https://legalweb.io
18
  * Description: WP DSGVO Tools (GDPR) help you to fulfill the GDPR (DGSVO) compliance guidance (<a target="_blank" href="https://ico.org.uk/for-organisations/data-protection-reform/overview-of-the-gdpr/">GDPR</a>)
19
+ * Version: 3.1.17
20
  * Author: legalweb
21
  * Author URI: https://www.legalweb.io
22
  * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
28
  die();
29
  }
30
 
31
+ define('sp_dsgvo_VERSION', '3.1.17');
32
  define('sp_dsgvo_NAME', 'sp-dsgvo');
33
  define('sp_dsgvo_PLUGIN_NAME', 'shapepress-dsgvo');
34
  define('sp_dsgvo_LEGAL_TEXTS_MIN_VERSION', '1579021814');