# Issue with Onebox and Youtube

**URL:** <https://meta.discourse.org/t/issue-with-onebox-and-youtube/125969>\
**Category:** Bug\
**Tags:** onebox\
**Created:** [August 16, 2019, 10:41am UTC](https://meta.discourse.org/t/issue-with-onebox-and-youtube/125969 "2019-08-16T10:41:49Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![nbianca](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nbianca/32/157984_2.png) [@nbianca](https://meta.discourse.org/u/nbianca)\
**Post date:** [August 18, 2019, 9:57am UTC](https://meta.discourse.org/t/issue-with-onebox-and-youtube/125969/5 "2019-08-18T09:57:41Z")

</div>

The problem was that the `First Onebox` was awarded for any posted link, no matter if it was or was not a Onebox. This happens because PrettyText adds `class="onebox"` to all links and then `Oneboxer` tries to parse all links with class `onebox`.

The change I made checks if the final document has any Oneboxes (Oneboxes are `aside` with class `onebox`). I will have another look and see what and why is it broken and come back with a change that fixes both of the issues.

---

_[View the full topic](https://meta.discourse.org/t/issue-with-onebox-and-youtube/125969)._
