It depends on the quality. Sometimes the Li-Ion battery will swell up and be bad the first time you use it, other times it will last the same as an original battery. The 3rd battery must output the same voltage as the original one, and must have same input voltage and amp as the original and power adapter. Something you might want to check also is capacity (in mAh) as this is how long it will last.
Typically, 3rd party ones are work fine and are perfectly safe.