If not cleaned properly, spilled milk can curdle, giving off a foul smell, staining your carpet, and damaging its fibers. Dish soap or vinegar and baking soda can prevent this.
If the milk stain is still wet, use a clean cloth to soak up as much of the liquid as possible. Blot the stain gently to avoid pressing the drink deeper into the carpet.
Then, combine 2 cups of warm water with 1 tablespoon of liquid dish soap and stir. If you want to use vinegar instead, mix 1 part cold water with 1 part distilled white vinegar.
Soak a cloth in the mix, wring it out, and press it onto the stain starting on the edges. Do this until the stain is no longer visible, then dab with a clean cloth.
If the stain is dry, scrape away the dried milk and then blot with a cold, damp cloth. Then, work a paste of cold water and laundry detergent into the carpet and rinse.