mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #67433
[Bug 1992702] [NEW] iframe htmlpurifier style attribute
Public bug reported:
We have embed code generated by Canva
However, Htmlpurifier removes 'style' attribute on iframe and hence the embed content is not displayed properly.
I am looking to add 'style' as allowed attribute for iframe, but it may have some security implication, refer https://bugs.launchpad.net/mahara/+bug/1843154
There is another option, that is using 'class', but it will require user to change the embed code.
Example embed code
<div style="position: relative; width: 100%; height: 0; padding-top: 56.2500%;
padding-bottom: 0; box-shadow: 0 2px 8px 0 rgba(63,69,81,0.16); margin-top: 1.6em; margin-bottom: 0.9em; overflow: hidden;
border-radius: 8px; will-change: transform;">
<iframe loading="lazy" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0; border: none; padding: 0;margin: 0;"
src="https://sourceurl" allowfullscreen="allowfullscreen" allow="fullscreen">
</iframe>
</div>
** Affects: mahara
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1992702
Title:
iframe htmlpurifier style attribute
Status in Mahara:
New
Bug description:
We have embed code generated by Canva
However, Htmlpurifier removes 'style' attribute on iframe and hence the embed content is not displayed properly.
I am looking to add 'style' as allowed attribute for iframe, but it may have some security implication, refer https://bugs.launchpad.net/mahara/+bug/1843154
There is another option, that is using 'class', but it will require user to change the embed code.
Example embed code
<div style="position: relative; width: 100%; height: 0; padding-top: 56.2500%;
padding-bottom: 0; box-shadow: 0 2px 8px 0 rgba(63,69,81,0.16); margin-top: 1.6em; margin-bottom: 0.9em; overflow: hidden;
border-radius: 8px; will-change: transform;">
<iframe loading="lazy" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0; border: none; padding: 0;margin: 0;"
src="https://sourceurl" allowfullscreen="allowfullscreen" allow="fullscreen">
</iframe>
</div>
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1992702/+subscriptions
Follow ups
-
[Bug 1992702] Re: Allow a certain style attribute in HTMLPurifier (for Canva iframe and others)
From: Robert Lyon, 2022-11-01
-
[Bug 1992702] Re: Allow a certain style attribute in HTMLPurifier (for Canva iframe and others)
From: Kristina Hoeppner, 2022-10-24
-
[Bug 1992702] A change has been merged
From: Mahara Bot, 2022-10-17
-
[Bug 1992702] A change has been merged
From: Mahara Bot, 2022-10-17
-
[Bug 1992702] Re: Allow a certain style attribute in HTMLPurifier for Canva iframe
From: Robert Lyon, 2022-10-17
-
[Bug 1992702] Re: Allow a certain style attribute in HTMLPurifier for Canva iframe
From: Kristina Hoeppner, 2022-10-16
-
[Bug 1992702] Re: Allow a certain style attribute in HTMLPurifier for Canva iframe
From: Kristina Hoeppner, 2022-10-14
-
[Bug 1992702] A patch has been submitted for review
From: Mahara Bot, 2022-10-13
-
[Bug 1992702] A patch has been submitted for review
From: Mahara Bot, 2022-10-13
-
[Bug 1992702] Re: Allow a certain style attribute in HTMLPurifier for Canva iframe
From: Nathan Nguyen, 2022-10-13
-
[Bug 1992702] Re: Allow a certain style attribute in HTMLPurifier for Canva iframe
From: Nathan Nguyen, 2022-10-13
-
[Bug 1992702] Re: iframe htmlpurifier style attribute
From: Kristina Hoeppner, 2022-10-12