[injectHtml] Fixed issues with \n being different than trailing \