Outbreaks often seem related to physical or emotional stress. Certain foods such as acidic foods, tomatoes, eggplant, and possibly gluten, may also cause them to develop. Ingredients in toothpaste can trigger a canker sore. Unlike cold sores, canker sores are not contagious.