Hello @bgamrat,
Pasting in text from another source sure can add a lot of funny html in the code. I don't think you could definitely point to it being a sign of plagiarism though unless you are able to identify elements of the code and determine that they could not possibly be from a student using a word processor, note app, etc. to formulate their answer outside of the quiz and then copy and paste it into the answer. I know that writing essay answers outside of Canvas and then pasting them in is a common practice for students who are worried about an unstable internet connection and don't want to lose progress on an answer if the quiz crashes.
I think the best thing you can do is to communicate with the student to try and understand their process and then look at how the evidence aligns with what they explain.
Regards,
James