klaro-js icon indicating copy to clipboard operation
klaro-js copied to clipboard

Do not remove ID attribute from SCRIPT tags

Open 2lm opened this issue 1 year ago • 0 comments

When Klaro rewrites script tags of the third-party apps/trackers, it removes id attribute if it is present in the script tag. It causes problems with some apps, for example Zendesk Widget. The tag below

<script id="ze-snippet" type="text/plain" data-type="application/javascript" data-src="https://static.zdassets.com/ekr/snippet.js?key=***" data-name="zendesk"></script>

is being rewritten to:

<script type="text/javascript" src="https://static.zdassets.com/ekr/snippet.js?key=***"></script>

...and stops working, because of the missing id attribute. Is it possible to change this behavior?

2lm avatar Apr 19 '24 15:04 2lm