Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twitter embed in Classic Block is duplicated #3865

Closed
westonruter opened this issue Dec 2, 2019 · 1 comment · Fixed by #3874
Closed

Twitter embed in Classic Block is duplicated #3865

westonruter opened this issue Dec 2, 2019 · 1 comment · Fixed by #3874
Assignees
Labels
Bug Something isn't working QA passed Has passed QA and is done
Milestone

Comments

@westonruter
Copy link
Member

Bug Description

Given post_content (from theme unit test data) that consists of:

https://twitter.com/nacin/status/319508408669708289

This post tests WordPress' <a title="Twitter Embeds" href="https://en.support.wordpress.com/twitter/twitter-embeds/" target="_blank" rel="noopener noreferrer">Twitter Embeds</a> feature.

This is incorrectly resulting in the Tweet being duplicated:

image

The generated HTML even includes the duplication:

<p><amp-twitter width="600" height="480" layout="responsive" data-tweetid="319508408669708289"></amp-twitter></p>
<amp-twitter width="600" height="480" layout="responsive" data-tweetid="319508408669708289" class="twitter-tweet" data-width="550" data-dnt="true" placeholder=""><blockquote class="twitter-tweet" data-width="550" data-dnt="true" placeholder="">
<p lang="en" dir="ltr">Really cool to read through and find so much awesomeness added to WordPress 3.6 while I was gone. I should take three weeks off more often.</p>
<p>— Andrew Nacin (@nacin) <a href="https://twitter.com/nacin/status/319508408669708289?ref_src=twsrc%5Etfw">April 3, 2013</a></p></blockquote></amp-twitter>
<p></p>
<p>This post tests WordPress’ <a title="Twitter Embeds" href="https://en.support.wordpress.com/twitter/twitter-embeds/" target="_blank" rel="noopener noreferrer">Twitter Embeds</a> feature.</p>

Expected Behaviour

The non-AMP version does not have a duplicated embed, and this is what it should look like in AMP:

image

Steps to reproduce

  1. Create a post and enter code editor mode, pasting the above post_content into it.
  2. Publish and view the AMP version/
  3. See duplicated tweet.

Additional context

The issue doesn't seem to occur in 1.4.1, so it seems to be some regression introduced in develop since the 1.4 branch.


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

@westonruter westonruter added the Bug Something isn't working label Dec 2, 2019
@pierlon pierlon self-assigned this Dec 2, 2019
@westonruter westonruter added this to the v1.5 milestone Dec 4, 2019
@csossi
Copy link

csossi commented Dec 7, 2019

Now not seeing any duplication,:

image

@csossi csossi added the QA passed Has passed QA and is done label Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working QA passed Has passed QA and is done
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants