Added escaping of enough html entities to prevent parsing as HTML and minor code cleanup.
Added escaping of enough html entities to prevent parsing as HTML and minor code cleanup.

cowlby/Lighter,cowlby/Lighter