This was recently posted, but closed for the reason that insufficient research had been done.
My approach is a little more subtle than others, perhaps.
Stack Exchange is a collaborative effort. If a question can be edited to remove the offensive part, then that's the right thing to do. Once that's done, it's no longer offensive.
The question might then be closed for other reasons.
Even after the edit, you could still flag it as offensive, because flags are recorded and can be an indicator of trolling activity. Such a flag should be marked helpful, but that doesn't necessarily mean that a penalty would be applied. The penalty is only really applicable if all the content is offensive and the post cannot be salvaged, in which case deletion for offence is the right course of action.