Back to ResponsiveImages Support

Mr Hound
Mr Hound

Hi,

The project use "EU cookie law madness" plugin.
This plugin provide such type of code :

<script>
window.cookieconsent.initialise({
    ...
    "elements":{
         header: '<span class="cc-header">{{header}}</span> ',
         message: '<span id="cookieconsent:desc" class="cc-message">{{message}}</span>',
         ...
    },
    ...
});
</script>

witch become with your plugin activated :

<script>
window.cookieconsent.initialise({
    ...
    "elements":{
        header: '<span class="cc-header">{{header}}&nbsp;',
        message: '<span id="cookieconsent:desc" class="cc-message">{{message}}',
        ...
    },
    ...
});
</script>

ALL closing tags are removed !!

Reproduce the issue :
1 - insert in your layout :

<script>
test = {
    "elements":{
         foo: '<span class="cc-header">foo</span> ',
         bar: '<span id="cookieconsent:desc" class="cc-message">bar</span>',
    }
};
</script>

2 - You'll get :

<script>
test = {
    "elements":{
         foo: '<span class="cc-header">foo ',
         bar: '<span id="cookieconsent:desc" class="cc-message">bar',
    }
};
</script>

see : github issue #13

It's really a blocking factor to use this plugin. Regards

Last updated

OFFLINE
OFFLINE

This problem has to do with PHP's DOMDocument class that is used in this plugin. It has problems when parsing html inside of strings. We won't be able to simply swap that out anytime soon (the issue is logged here).

In this case the responsive images plugin is simply not compatible with the EU cookie law madness plugin. You'll have to get rid of either one.

I'll shamelessly plug our own cookie consent plugin here in case you are looking for an alternative: https://github.com/OFFLINE-GmbH/oc-gdpr-plugin

Mr Hound
Mr Hound

Thank's for the alternate plugin ... will give it a try.

The problem will arise each time a script uses string's templates whit part of HTML. :-/

Last updated

1-3 of 3