owid-grapher
owid-grapher copied to clipboard
Twitter embeds break our gdoc articles
using the html
archie element with twitter's suggested snippet causes the rendering of the site to break
e.g.
html: <div><blockquote class="twitter-tweet"><p lang="en" dir="ltr">This is one of my favorite infographics. A lot of people underestimate just how much life has improved over the last two centuries: <a href="https://t.co/djavT7MaW9">https://t.co/djavT7MaW9</a> <a href="https://t.co/kuII7j4AuW">pic.twitter.com/kuII7j4AuW</a></p>— Bill Gates (@BillGates) <a href="https://twitter.com/BillGates/status/1086662632587907072?ref_src=twsrc%5Etfw">January 19, 2019</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> </div>
inserts the embedded JSON into the document body, and prevents the rest of the article from hydrating correctly (grapher embeds don't load, etc)
This is disastrous in the case of our How do we know the history of extreme poverty article: see this image
I have removed the snippet and republished that article, which was the only gdocs article to feature an embedded tweet.
If we want to embed tweets again in the future, we will have to fix this.