Added protection against bad html characters.