Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #58120, comment 2


Ignore:
Timestamp:
04/12/2023 10:04:23 PM (14 months ago)
Author:
johnbillion
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #58120, comment 2

    v2 v3  
    33What's happening:
    44
    5 1. User wants to embed a toot ([https://mastodon.social/@jk/110169910775357223 https://mastodon.social/@jk/110169910775357223] in the example from @mediaformat) so pastes it into the editor, either directly or via the Embed block.
     51. User wants to embed a toot ([https://mastodon.social/@jk/110169910775357223 this link] in the example from @mediaformat) so pastes it into the editor, either directly or via the Embed block.
    662. Mastodon supports oEmbed auto-discovery, therefore that URL contains an `application/json+oembed` link that points to an oEmbed endpoint: https://mastodon.social/api/oembed?format=json&url=https%3A%2F%2Fmastodon.social%2F%40jk%2F110169910775357223 .
    773. The `html` property in the oEmbed endpoint response includes an `<iframe>` and a `<script>` tag. The iframe is allowed by the oEmbed handler in WordPress and is outputted. The script tag isn't and therefore gets stripped but it doesn't appear to matter because it's only there to adjust the height of the contents of the iframe and doesn't affect the main styling.