In the previous Halachot, we have explained that our Sages prohibited baking bread with milk (or animal fat) mixed in the dough lest others come and eat this bread with meat (or dairy).
We have mentioned that if the bread or baked good is baked in a distinct shape which everyone recognizes to be dairy, it is permissible to bake it. It is for this reason that the bakeries in Israel make cheese bourekas in a triangular shape while bourekas filled with other things are prepared in other shapes.
Baked Goods Known to be Dairy
Any baked good known by all to be dairy may be baked as usual, even without making it in a distinct shape. Thus, in a pizza shop where there are many different baked goods filled with cheese and the like (such as calzones, pretzels, etc.) and everyone knows that such baked goods are dairy, there is no need for a specific distinctive mark on every baked good.
Hagaon Harav Ovadia Hedaya zt”l (in his Responsa Yaskil Avdi, Volume 5, Yoreh De’ah, Chapter 8) was very upset when Israeli factories began producing milk chocolate (before that point, all chocolate produce in Israel was bittersweet). He writes that this may cause a great pitfall as people do not know that the chocolate is dairy and they may mistakenly eat it with or immediately after a meat meal.
Maran Rabbeinu Ovadia Yosef zt”l (in his Halichot Olam, Volume 7, page 50) questions this since we only find our Sages prohibited baking bread with milk mixed into the dough but we do not find that they prohibited doing so with other food products. Furthermore, the labels of such milk chocolates clearly state that they contain milk and this constitutes a “distinctive mark” such that there is no prohibition to produce milk chocolate.
Nowadays, when milk chocolate is extremely common (and most chocolates on the market may, in fact, be dairy), there is certainly no concern. This is certainly true when there is a sticker on the baked good or other food product indicating that it is dairy in that this constitutes an “distinctive mark” and there is no prohibition at all to prepare it.
Regarding cakes, cookies, and other sweet pastries, the great Rabbeinu Yosef of Tarani (in his responsa, Chapter 18) writes, as follows: “Cakes called ‘Alahshu’ which are smeared with lamb fat are permissible because they are sweet and are not eaten with cheese.”
The aforementioned “Alahshu” is a pastry prepared by Greek Jews on Purim filled with walnuts and sugar and they would then smear them with animal fat (nowadays vegetable fat/oil). Rabbeinu Yosef of Tarani explains that the reason why they may prepared in this way and not subject to the ban of kneading dough with either milk or animal fat is because they are a dessert item and not usually eaten with cheese.
After discussing this matter at length, Maran zt”l rules likewise and writes that any baked good or pastry that is not eaten with milk or meat, such as cakes and cookies, may be prepared with milk or meat in the dough.