You're right to be concerned. OPs method is how you get pwned through prompt injection.