Inside the enclosure.
Moving the snake prior to feeding can stress the snake, which can be reason for refusals.
Assuming the snake eats:
Moving the snake out of the feeding enclosure is a good way to get bitten, since the snake is likely still in feed mode.
Moving the snake can also lead to the snake regurgitating.
I have always fed inside the snake's enclosures, and have NEVER been bitten inside any of my enclosures.
I also have never had any substrate related issues due to feeding inside the enclosure. Snakes digest fur and bone, a little dirt won't hurt.