htmlContent now tolerates empty content