is it safe to consume milk of magnesia?

I have a canker sore and was wondering if it's okay to swallow after swishing that around my mouth lol