Remove these intermediate variables

...and pointless subsequent null check.

Change-Id: I50721a17eeec2f9ee0b515507cdda4ed05ddcae5
We don't check the extension for html

...since 86c6f18c2766aad43d6e3bfcf3530e40440ebca7,
so move the related code and comment to the plain
text scope.

Change-Id: I501ebaba915ddaa3f5d1d8d2977d3ba70fb6071b