configmanager: don't trim key/val twice