improved HTML serializer for topics