html: don't crash when the title element is empty