I was never able to replicate this on v7.7.5 nor v8. For whatever reason, it appears that the script was being "read in" as plain code versus being processed by the web server (as the portions of coding that appear seem to be plain HTML).