With the rack in the middle position, preheat the oven to 180 °C (350 °F).
Butter a 20-cm (8-inch) square dish.
In a double boiler, melt the chocolate, stirring constantly. Set aside.
In a bowl, sift together the flour and baking powder.
In another bowl, beat the sugar and eggs with an electric mixer until the mixture is pale and creamy. While beating, add the melted chocolate and vanilla. Add the dry ingredients alternately with the milk, stirring with a wooden spoon. Gently fold in the raspberries.
Pour into the pan. Bake for about 40 minutes or until a toothpick inserted in the centre of the cake comes out clean. Let cool in the pan. Cut into squares.