YouTube Iframe not unblocked (commented out) on D10

Created on 26 October 2023, about 1 year ago
Updated 21 May 2024, 6 months ago

I setup cookie content blocker on a D9 Site to block YouTube Videos, wich is working fine.
on my d10 dev site, I have the following problem:

I checked block YouTube media
/admin/config/user-interface/cookie-content-blocker/media

wich is working fine in D9. but in D10 the Video ist not displayed.
In developer tools, I can see that the iframe is getting commented out.

//<!--[CDATA[
<iframe src="https://loacalpathofsite/media/oembed?url=https%3A//youtu.be/XyLG9DZ0piI&amp;max_width=0&amp;max_height=0&amp;hash=T7fhJ5MAshU0Z75Py-H4GctnEEzZhIjfyFLQNXpX1Ig" frameborder="0" allowtransparency width="200" height="113" class="media-oembed-content" loading="lazy" title="title of video"-->

//]]&gt;

where can be the problem?

seems this line part of the problem
originalContent = originalContent.replace('<!--//--><![CDATA[// ><!--', '').replace('//--><!]]>', '');
because the only thing that is displayed is:
// //]]>

if cookies are accepted,
<script class="js-cookie-content-blocker-content" type="text/plain">
is removed, but not the part // //]]>

it seems, that "replaceContent" is undefined. see attached screenshot

BTW: I am not using CKEditor 5 but CKeditor 4 contributed module.

🐛 Bug report
Status

Closed: outdated

Version

2.2

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024