Figured it out. Problem was that I was using the text mode editor, which for some reason likes to auto-remove certain formatting tags, like linebreaks, paragraphs, and so on. Entering the code into the Visual editor somehow worked.
I would have thought it would be the other way around, but there you go, in case anyone runs into this problem in the future.