Yup the less 'attention' one gives to these accidental curse words the better ... I too just repeat the word 'correctly' in my reply back to them ... because children love our attention and will continue long past being able to correctly say it just for the 'reinforcement' saying it incorrectly gets them!

Now if a child 'curses' in the correct context or uses words that are considered rude or hurtful in some circles I would ignore it the FIRST time but if it became a habit I would just say 'that is not a word we use here - here we can say XXXX" insert whatever word is suitable .... the word STUPID for example is not a word that I personally like and therefore gets redirected to SILLY or HARD / FRUSTRATING depending on the context it was used in ... as in "that was so stupid" if a child does something they did not intend gets redirected to 'well that was a silly thing to do" verses 'OMG this toy is so stupid' being redirected to 'yes I can see that toy is hard/frustrating for you'....and eventually they GET that those words are not for HERE cause I do not use them!