Optimized via:
https://github.com/discourse/discourse/commit/b3540992523a0356b6e110c6760ef2e05707957e
and
https://github.com/discourse/onebox/commit/e0103d3b6b31e850f3ae65b38bb7d1736b373c91