I apologize for the ambiguity. In American English, the rule is to put the punctuation mark at the end of a sentence inside the quotation marks, even though it can lead to confusion in cases like this. I didn't realize until now that the rest of the English-speaking world adopted a more logical convention over a century ago.

I'll edit my question to make the meaning clearer. Thanks again for your answer.