Welcome to the daily halacha (Jewish law). If a birthday cake has “Happy Birthday” and the name of the person having the birthday on it, are you allowed to cut it on Shabbat? Says the poskim (the rabbis), we know mochek (erasing) on Shabbat is not allowed. As part of erasing, the poskim, the rabbis, discuss erasing foods. Let’s say foods have letters on them. Let’s say you have a cracker, a biscuit, or a cookie that has letters on it. By eating it or cutting it, you are erasing the letters. So is that allowed on Shabbat? Yes or no?
Maran (our master) Chacham Ovadia Yosef says, after a very long teshuvah (responsum) in Yabia Omer, that cookies or cakes with birthday names or “Happy Birthday” on them are something a person has a lot to cut and eat on Shabbat. Try not to cut through the actual letters on the birthday cake; try to cut between the letters. But even if you cut directly through the letters, it is also allowed on Shabbat because you are going to eat it. And eating the cake on Shabbat—eating letters that are edible on Shabbat—is allowed in this case, says Chacham Ovadia Yosef.
So too with cookies, biskvitim (biscuits), and crackers: if they have all those letters engraved in the actual cookie, meaning the letters were baked with the cookie, or even if you add the letters afterward—like a lot of times when you have whipped cream or a bar of chocolate with “Happy Birthday” written on it, and then place that bar of chocolate on the cake—even that, says Chacham Ovadia Yosef, you are allowed to cut on Shabbat any way, shape, or form that you want. However, try not to cut directly through the letters. Try to cut between the letters. That means you’re cutting the word, but not the actual letters on Shabbat. But even then, you don’t have to be so machmir (stringent), says Chacham Ovadia Yosef.
So what’s the halacha? The halacha is that one is allowed to cut a cake on Shabbat, even though it has letters, and one is allowed to eat the cake and eat cookies that have letters on them. But on Shabbat...

