Make the quoteToHtml function cleaner