Say a writer, with em... "undesirable" grammar were to submit their MS to a publisher (small press or large press, you're choice). If the story was absolutely stellar, could their grammar be overlooked? I know that there are plenty of people and resources available to the public, and there should really be no reason for a writer to submit his/her work if it's in bad shape, but isn't it also supposedly the editor's job to filter this stuff out?

What do you say- does a brilliant story have the potential to be published, despite horrible grammar?