This will take the provided text, and turn it into HTML If it contains HTML, it will validate it, otherwise it will wrap everything in a PRE This function also removes extra spaces from the beginning of lines but will do so in a manner that indenting is preserved