ampproject / ampproject/amp-wp

amp-iframe, amp-instagram, amp-youtube, amp-soundcloud wrapped in unnecessary p tags

Open
#4,450 1 comment 0 reactions 1 assignee Claimed by @thelovekesh View on GitHub
Embeds P2 Punted WS:Core
Dominant language
PHP
Stars
1.8k
Forks
378
Avg merge
1d 15h
Merged PRs (30d)
10

Description

## Bug Description

This is a continuation of #4358 where the same problem applied to `amp-facebook` and was fixed.

The premise is that these `amp-*` objects should be in the root of the document, and not be wrapped in `

` tags. Twitter already worked this way, and in #4358 `amp-facebook` was fixed to match.

I've now noticed that `amp-iframe`, `amp-instagram`, `amp-youtube`, `amp-soundcloud` face the same problem:

Screen Shot 2020-03-25 at 7 19 09 PM

Screen Shot 2020-03-25 at 7 21 08 PM

Screen Shot 2020-03-26 at 3 50 05 PM

As with the previous ticket, it's important to me because I need to style something that immediately follows the object (`amp-instagram+.translation`), but also generally it just seems like good practice all around.

Instagram embed code:

```
[embed]https://www.instagram.com/p/Buq8vU6Hcxn/[/embed]

This is a translation of the Instagram post above.

```

YouTube embed code

```
[embed]https://www.youtube.com/watch?v=vXPJVwwEmiM[/embed]

This is a translation of the YouTube video above.

```

Soundcloud embed code

```
[embed]https://soundcloud.com/globalvoices/summitpodcast[/embed]
```

**Mostly likely this applies to other embeds as well. A general review would be greatly appreciated.**

---------------

_Do not alter or remove anything below. The following sections will be managed by moderators only._

## Acceptance criteria

*

## Implementation brief

*

## QA testing instructions

*

## Demo

*

## Changelog entry

*

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.