Subscribe to The Chicago Manual of Style Online
Quotations and Dialogue
Q. Microsoft Word just suggested I change “What do you mean ‘unfortunately?’ ” to “What do you mean ‘unfortunately’?” Should I tell Word to leave me alone, or am I mistaken in believing that, in American English, quotation marks envelop all neighboring punctuation?
A. Ah, you are mistaken. You must not include question marks and exclamation marks within the quotation marks unless they are part of the quotation. (Please see CMOS 6.70.) But since MS Word can’t possibly divine the original quotation, yes, you may tell it to leave you alone.