Closed echosa closed 1 year ago
@sidkshatriya Any updates on this? We are blocked by this issue.
Can you please have a look @karens if possible ^^ ?
This correction is extremely important. Please include the main branch.
Closing in favor of https://github.com/Lullabot/amp-library/pull/307. Wanted to add something, couldn't do it on this forked branch.
Fixes #264
As stated in that issue, there is an issue with embedded tweets that quote other tweets. The issue is that there are nested
<blockquote>
tags, and when theDOMQuery
loops through the DOM to parse out the tweets to convert to AMP, it runs into an issue. The inner blockquote is one of the elements that are looped through, but before it is processed the outer blockquote containing it is processed first. During processing, the inner blockquote is removed from DOM when the outer blockquote is removed and replaced with its AMP tag. This results in a null error when the loop gets to the previously removed inner blockquote.In this PR, I have changed the CSS lookup to only grab and loop through the outer blockquotes. This has been running successfully in production for us for over a week, and I've added tests to the test suite, so I feel confident that this fix is working.