Plugin Author
aytac
(@aytac)
Hi @panosk20,
Do you use any pagebuilder or any custom plugin? Because we couldn’t reproduce the issue.
FYI Do you use cookiebot addons feature for embed videos? Cookiebot supports placeholder so you don’t need to add that “accept cookies” in the content, cookiebot will do that for you.
Take care,
Aytac
Hi Aytac,
I do not use any page builder for the posts.
After a little bit of testing, i realised that the code works OK if you add a new post (or update an existing one) in the “Text” tab. If you switch to the “Visual” tab before saving, the javascript code from the link gets removed.
Working in the Text tab is fine for me. However, I shouldn’t be posting on this site in the future, different people from Monex should. My worry is that they may accidentally switch tabs, or go back to edit an existing post and that post loads with the “Visual” open.
Is there any way of preventing WordPress from deleting the javascript even when the Visual tab is on?
Also I am not sure what you meant by “FYI Do you use cookiebot addons feature for embed videos? Cookiebot supports placeholder so you don’t need to add that “accept cookies” in the content, cookiebot will do that for you.” Is there a link you can send me?
Many thanks
Panos
Plugin Author
aytac
(@aytac)
Hi @panosk20,
The cookiebot plugin has a submenu item called ‘Prior consent’. On that page you can enable ‘Embed autocorrect’ option.
This option will allow cookiebot to scan the post contents for the video links from Youtube, Twitter, Vimeo and Facebook. These video links doesn’t need to have the cookiebot’s html attributes(data-src, data-cookieconsent). So you can use the default youtube share link in your post content.
For example:
<iframe width=”560″ height=”315″ src=”https://www.youtube.com/embed/xxxxxx” frameborder=”0″ allowfullscreen=”allowfullscreen”></iframe>
Cookiebot will scan the post content and find that link. It will then convert it to correct html attributes with data-src and data-cookieconsent.
On the prior consent page, you have also an option to show a placeholder. That does display a message on the frontend to allow the required cookie types.
Take care,
Aytac
-
This reply was modified 7 years, 5 months ago by
aytac.