Replies: 5 comments
-
We already do add support for HTML5 attributes, FTR: Can you supply example embed codes we should test against? |
Beta Was this translation helpful? Give feedback.
-
I'm having trouble with any Twitter widget, for instance the following:
The async and charset attributes are stripped from the script tag, and all markup after the closing script tag as well. |
Beta Was this translation helpful? Give feedback.
-
@bar9 Did you manage to get a solution for adding <script> tags from Twitter or other media platforms in the end? Be grateful for any insight. |
Beta Was this translation helpful? Give feedback.
-
@brandonkelly that may be so but 'async' is still not supported nor is 'charset'. Any news on when you can add support for these attributes? Thanks |
Beta Was this translation helpful? Give feedback.
-
We'll be moving to Html Sanitizer in Craft 4, which will make this issue easier to tackle than with the Html purifier. |
Beta Was this translation helpful? Give feedback.
-
Relevant for the Widget Plugin:
For e.g. Twitter or Instagram embeds, see related stack overflow question for reference
As several other HTML5 features are affected, this library might point to a feasible direction, however they don't seem to support the mentioned attributes for <script> yet.
With the following config:
"HTML.SafeScripting": ["https://platform.twitter.com/widgets.js", "//www.instagram.com/embed.js"]
,when including a Twitter embed widget,
async and defer attributes are just stripped, which is just a site performance issue but does not affect functionality. The charset tag is more problematic: All Markup after the widget is deleted on save.
Beta Was this translation helpful? Give feedback.
All reactions