Plugin Directory

Changeset 2605301 for shapepress-dsgvo


Ignore:
Timestamp:
09/27/2021 06:27:15 AM (5 years ago)
Author:
legalweb
Message:
  • removed unused templates
  • fixed remote images
  • added wp_kses when we echo scripts
Location:
shapepress-dsgvo/trunk
Files:
2 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • shapepress-dsgvo/trunk/includes/class-sp-dsgvo-integration-api-base.php

    r2604177 r2605301  
    190190    }
    191191
     192    function getAllowedHtmlForScriptsForKses() {
     193        return  array_merge(
     194            wp_kses_allowed_html( 'post' ),
     195            array(
     196                'script' => array(
     197                    'type' => array(),
     198                    'src' => array(),
     199                    'charset' => array(),
     200                    'async' => array()
     201                ),
     202                'noscript' => array(),
     203                'style' => array(
     204                    'type' => array()
     205                ),
     206                'iframe' => array(
     207                    'src' => array(),
     208                    'height' => array(),
     209                    'width' => array(),
     210                    'frameborder' => array(),
     211                    'allowfullscreen' => array()
     212                )
     213            )
     214        );
     215
     216    }
     217
    192218    public final function checkIfIntegrationIsAllowed($integrationSlug)
    193219    {
     
    277303
    278304        if ($integrationAllowed) {
    279             echo $result; // we cant esc here because the original script/code which the user enters has to be written. otherwise trackings scripts and chatbots,. would not work
     305            echo wp_kses($result, $this->getAllowedHtmlForScriptsForKses());
    280306        }
    281307        return;
     
    301327
    302328        if ($integrationAllowed) {
    303             echo $result; // we cant esc here because the original script/code which the user enters has to be written. otherwise trackings scripts and chatbots,. would not work
     329            echo wp_kses($result, $this->getAllowedHtmlForScriptsForKses());
    304330        }
    305331        return;
     
    325351
    326352        if ($integrationAllowed) {
    327             echo $result; // we cant esc here because the original script/code which the user enters has to be written. otherwise trackings scripts and chatbots,. would not work
     353            echo wp_kses($result, $this->getAllowedHtmlForScriptsForKses());
    328354        }
    329355        return;
  • shapepress-dsgvo/trunk/includes/integrations/tagmanager/googletagmanager/class-sp-dsgvo-google-tagmanager-api.php

    r2604177 r2605301  
    4848        $result = "<!-- id='sp-dsgvo-script-container-$this->slug' class='sp-dsgvo-script-container'-->$jsCode<!-- end sp-dsgvo-script-container-$this->slug -->";
    4949        if ($integrationAllowed) {
    50             echo $result; // we cant esc here because the original script/code which the user enters has to be written. otherwise trackings scripts and chatbots,. would not work
     50            echo wp_kses($result, $this->getAllowedHtmlForScriptsForKses());
    5151        }
    5252        return;
     
    7373
    7474        if ($integrationAllowed) {
    75             echo $result; // we cant esc here because the original script/code which the user enters has to be written. otherwise trackings scripts and chatbots,. would not work
     75            echo wp_kses($result, $this->getAllowedHtmlForScriptsForKses());
    7676        }
    7777        return;
  • shapepress-dsgvo/trunk/includes/integrations/tagmanager/matomotagmanager/class-sp-dsgvo-matomo-tagmanager-api.php

    r2604177 r2605301  
    4848        $result = "<!-- id='sp-dsgvo-script-container-$this->slug' class='sp-dsgvo-script-container'-->$jsCode<!-- end sp-dsgvo-script-container-$this->slug -->";
    4949        if ($integrationAllowed) {
    50             echo $result; // we cant esc here because the original script/code which the user enters has to be written. otherwise trackings scripts and chatbots,. would not work
     50            echo wp_kses($result, $this->getAllowedHtmlForScriptsForKses());
    5151        }
    5252        return;
  • shapepress-dsgvo/trunk/templates/de_DE/emails/legal-texts-update.php

    r2247191 r2605301  
    244244                                                <table width="100%" align="center" border="0" cellspacing="0" cellpadding="0" style="margin: 0px auto; min-width: 100%;" role="presentation">
    245245                                                    <tr>
    246                                                         <td align="center" valign="top" class="image-full-width" width="560" style="width: 560px; line-height: 0px;"> <a href="https://legalweb.io" style="font-size: inherit; border-style: none; text-decoration: none !important;" border="0"><img src="https://legalweb.io/wp-content/uploads/2019/11/banner-1544x500.png" width="560" style="height: auto; display: block !important; width: 100%; max-width: 560px; min-width: 100%;" alt="legal web GmbH" border="0" hspace="0" vspace="0" height="auto"></a></td>
     246                                                        <td align="center" valign="top" class="image-full-width" width="560" style="width: 560px; line-height: 0px;"> <a href="https://legalweb.io" style="font-size: inherit; border-style: none; text-decoration: none !important;" border="0"><img src="<?php echo esc_attr(SPDSGVO::pluginURI('images\banner-1544x500.png')); ?>" width="560" style="height: auto; display: block !important; width: 100%; max-width: 560px; min-width: 100%;" alt="legal web GmbH" border="0" hspace="0" vspace="0" height="auto"></a></td>
    247247                                                    </tr><!-- start space -->
    248248                                                    <tr>
     
    308308                                                <table width="265" dir="ltr" align="right" border="0" cellpadding="0" cellspacing="0" class="full-width right" style="max-width: 265px; min-width: 100%;" role="presentation">
    309309                                                    <tr>
    310                                                         <td align="center" valign="top" class="image-full-width" width="265" style="width: 265px; line-height: 0px;"> <a href="#" style="text-decoration: none !important; font-size: inherit; border-style: none;" border="0"> <img src="https://legalweb.io/wp-content/uploads/2020/02/Datenschutzvereinbarungen-Einstellungen.png" width="265" style="max-width: 265px; height: auto; display: block !important; min-width: 100%;" vspace="0" hspace="0" alt="image2" height="auto"></a> </td>
     310                                                        <td align="center" valign="top" class="image-full-width" width="265" style="width: 265px; line-height: 0px;"> <a href="#" style="text-decoration: none !important; font-size: inherit; border-style: none;" border="0"> <img src="<?php echo esc_attr(SPDSGVO::pluginURI('images\Datenschutzvereinbarungen-Einstellungen.png')); ?>" width="265" style="max-width: 265px; height: auto; display: block !important; min-width: 100%;" vspace="0" hspace="0" alt="image2" height="auto"></a> </td>
    311311                                                    </tr>
    312312                                                </table>
Note: See TracChangeset for help on using the changeset viewer.