I would suggest extracting these to private variables, so that they are compiled just once and are documented as to what they do (e.g. took me a while to figure out this one is meant to remove HTML entities)