For the filling, melt the butter over a low heat in a small saucepan. Once melted, remove from the heat and stir in all of the remaining filling ingredients until well combined. Set aside to cool.
Preheat the oven to 220C/425F/Gas 7. Grease a baking tray with the margarine.
For the pastry, roll out the pastry on a lightly floured work surface to a thickness of about 3mm/⅛in. Using a 6cm/2½in cutter, cut the pastry into rounds.
Place a teaspoon of the filling in the middle of each round, then brush the edges of half the pastry with milk. Bring the other half of the pastry over and seal. Bring the corners of the pastry up into the middle and pinch to seal.
Turn thr sealed pastry parcel over, so that the seam is underneath, then gently roll out until it is about ½cm/¼in thick. Gently pat back into a round shape and place onto the greased baking tray.
Slash each cake across three times using the tip of a sharp knife. Brush the cakes with milk and sprinkle with caster sugar.
Bake for 15 minutes, or until the pastry is golden-brown and puffed up. Transfer the cakes to a wire rack to cool.
Dust the eccles cakes with icing sugar before serving.