I've seen a question on here before that mentioned drinking a potion opens up a character to an opportunity attack, but the question was referring to Pathfinder. Is this the case for DnD 5e?
No. Opportunity Attacks list one event that triggers them: When you move out of a creature's reach.
In a fight, everyone is constantly watching for enemies to drop their guard. You can rarely move heedlessly past your foes without putting yourself in danger; doing so provokes an opportunity attack. You can make an opportunity attack when a hostile creature that you can see moves out of your reach. To make the opportunity attack, you use your reaction to make one melee attack against the provoking creature. The attack interrupts the provoking creature's movement, occurring right before the creature leaves your reach.
-PHB p. 195. Basic p. 74
Some abilities can give a creature additional opportunities for opportunity attacks, such as Mage Slayer, which provides one when someone in reach casts a spell. But without an explicit exception (none of which currently exist for potions), drinking a potion will not trigger an opportunity attack.