Condense df sanitization
Merge pull request #7779 from techhat/cmdinjection

Condense df sanitization