ESP8266 Access Point mode send HTML response

Not a direct answer to your question, but consider programming the ESP8266 directly. It's much easier to debug than AT-commands, and there are many good resources on how to host HTML pages with it.

If you really, really want to use AT-commands (even though there are many reasons why you shouldn't), use a high-level AT library rather than trying to write the AT code yourself.

Pieter