The law you're thinking of expired back in 2010. Generally, if you sell property at a gain that gain is taxable, and it flat out does not matter what you used the funds for.
However, if you lived in the house as your primary residence for at least two of the last five year's you owned it, then:
If filing single your first $250K of gain is exempt from capital gains tax.
If filing married filing joint the first $500K of gain is exempt from capital gains tax.
Now there are things that can change that tax exempt amount to, or eliminate it entirely. But that's the rough gist of the law. TurboTax handles most of these situations just fine.