I don't think the message should be HTML encoded in the database. I think the design of the test is to pull out unencoded data from the database, then encode HTML using the web framework.