JRA-32201 Fixes required for HTMLSafe compatability