The Photoionization of a Star-forming Core in the Trifid Nebula