Automattic / Automattic/jetpack
Classic Editor adds extra p tags to Instagram Embed
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
#### Steps to reproduce the issue
1. Use Classic Editor.
2. Place Instagram post url to editor (doesn't matter Visual, Text, with or without p tags)
3. Save Post.
4. Check frontend code.
#### What I expected
No extra p tags, eg what you get with `remove_filter( 'the_content', 'wpautop' );`.
#### What happened instead
Closing `
` tag after the first link:```
```
Closing `` is inside p tag: ``
#### Other information
This is essentially the same issue as https://core.trac.wordpress.org/ticket/51328 - it only happens with Classic Editor, with and without Jetpack. Core probably won't fix as they are removing the Instagram embed?
Contributor guide
Research direction
Start by reproducing the issue in Classic Editor with an Instagram post URL, then compare the saved frontend markup with and without the wpautop filter. Done means the Instagram embed no longer receives extra p tags or malformed paragraph and anchor markup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- content
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100