I've used the htmLawed library to secure user input against XSS attacks in one of my projects and I think Lilina developers may want to test it for use in Lilina. It also claims to make feeds XML-compliant by balancing tags, checking/transforming entities, removing invalid XML chars etc. Unlike the filter Lilina currently uses, this may be fast and more trim (only one file).