Custom html serializer with tests