This looks like one for @TrystanLea - if nothing else, I’d be worried that it points to a weakness that’s inviting a buffer overflow/cross-site scripting attack.
If you can get into the Pi via SSH, or you can take the SD card out and edit the file elsewhere, then this might help:
(where you’re adding to the wpa_supplicant.conf file).