Implement msg.replace in filter.ModifyEventFilter