An exclamation point or question mark at the end of a sentence ending with a bit of quoted matter goes outside rather than inside the quotation marks if the exclamation point or question mark belongs to the larger sentence rather than to the quoted bit,