Added allow_dom attribute to be able to filter out DOM