ensure proper escape of html entities during list processing